• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: possible bug with getattrlist() and GetFileInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possible bug with getattrlist() and GetFileInfo


  • Subject: Re: possible bug with getattrlist() and GetFileInfo
  • From: Esteban Barahona <email@hidden>
  • Date: Sat, 30 May 2009 08:36:32 -0600

you are still using window$?
...

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.
 
Thanks,

On Sat, May 30, 2009 at 4:39 PM, Steve Checkoway <email@hidden> wrote:

On May 29, 2009, at 10:30 PM, rohan a wrote:

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:

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

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.

--
Steve Checkoway



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: possible bug with getattrlist() and GetFileInfo
      • From: Amanda Walker <email@hidden>
References: 
 >possible bug with getattrlist() and GetFileInfo (From: rohan a <email@hidden>)
 >Re: possible bug with getattrlist() and GetFileInfo (From: Steve Checkoway <email@hidden>)
 >Re: possible bug with getattrlist() and GetFileInfo (From: rohan a <email@hidden>)

  • Prev by Date: Re: possible bug with getattrlist() and GetFileInfo
  • Next by Date: Re: possible bug with getattrlist() and GetFileInfo
  • Previous by thread: Re: possible bug with getattrlist() and GetFileInfo
  • Next by thread: Re: possible bug with getattrlist() and GetFileInfo
  • Index(es):
    • Date
    • Thread