Re: possible bug with getattrlist() and GetFileInfo
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On May 30, 2009, at 4:57 PM, rohan a wrote: Thanks, On Sat, May 30, 2009 at 4:39 PM, Steve Checkoway <s@pahtak.org> wrote: On May 29, 2009, at 10:30 PM, rohan a wrote: steve$ touch foo steve$ /Developer/Tools/GetFileInfo foo file: "/Users/steve/foo" type: "" creator: "" attributes: avbstclinmedz created: 05/30/2009 04:03:02 modified: 05/30/2009 04:03:02 steve$ echo foo > foo steve$ /Developer/Tools/GetFileInfo foo file: "/Users/steve/foo" type: "" creator: "" attributes: avbstclinmedz created: 05/30/2009 04:03:02 modified: 05/30/2009 04:03:18 steve$ vim foo # modified here steve$ /Developer/Tools/GetFileInfo foo file: "/Users/steve/foo" type: "" creator: "" attributes: avbstclinmedz created: 05/30/2009 04:03:32 modified: 05/30/2009 04:03:32 -- Steve Checkoway _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/info1686%40gmail.com This email sent to info1686@gmail.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/brian%40classicalguitar.ne... Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... vi and other text editors usually do a "safe save", where your edited file is saved to a new temporary file and then renamed to the original. Thus you really have a brand new file with a brand new creation date. Hello, Actually I used the vi editor to modify the file. When I use touch command or cat >> example the creation time does not change. But why should this happen? This behaviour is not seen with Windows. Looks fine till here. Now if I modify the contents of the file "example". How are you modifying it? If the program you use actually writes a new file, then this is the expected behavior: It seems the bash builtin echo modifies the file whereas vim (probably) performs the safer operation of writing a temporary file and then using rename(2) to replace the file. This email sent to brian@classicalguitar.net This email sent to site_archiver@lists.apple.com
participants (1)
-
Brian Bergstrand