1 Jul 2002 03:57
Re: Save file w/ orig mtime?
Soren Andersen <soren_andersen <at> speedymail.org>
2002-07-01 01:57:31 GMT
2002-07-01 01:57:31 GMT
On Sat, 29 Jun 2002, Colin Keith wrote: > On Sat, Jun 29, 2002 at 06:58:14PM +0000, Soren Andersen wrote: > : it's got the same 'last modified time' as it did before. > Doesn't that rather defeat the purpose of a 'last modified time' ? Well, of course it does. But the example for testing that you chose is the counter-case to why I would want this, i.e. you are appending new text but I would not be. I would typically be wanting to be (re)formatting some textfile (say, a news or email posting saved to my hard disk in the past) but not changing anything but wrapping / whitespace, therefore. In that case I'll find it very helpful not to have the 'mtime' updated in a way that truly would be misleading as to when the human-meaningful _content_ of the file was last changed. That's "why". > Still let see, this works on UNIX. Although you do get the "this file > has been modified since you last saved it" on subsequent saves, but I'm > sure you can fix it if it bothers you: " Cause the last modified time 'not to be changed' " when saving a file. Actually snapshots the mtime " before saving, then resets after saving. " Needs +perl. " - sed bob. Thank you very much for the work you put in. I have to admit I am puzzled by some of it. Who or what is "- sed bob" anyway? Is that a nickname of someone, or a reference to something about VIM?(Continue reading)

[]s,
Luis Alberto.
RSS Feed