• 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: st_ctimespec not implemented?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st_ctimespec not implemented?


  • Subject: Re: st_ctimespec not implemented?
  • From: Chris <email@hidden>
  • Date: Fri, 27 Jun 2008 00:02:52 +1000


On 26/06/2008, at 11:46 PM, Jean-Daniel Dupas wrote:


Le 26 juin 08 à 15:29, Chris a écrit :


I was looking for a way to figure out how long files have been in the trash, and I was hoping that stat.st_ctimespec would provide that, seeing as stat(2) says that rename(2) and link(2) will update the ctime.


However this isn't the case. Renaming files doesn't affect the ctime. Is this because Darwin doesn't implement ctime, or because HFS+ doesn't implement it, or am I missing something else?

Or because moving a file on HFS+ is not considere as renaming it ? On HFS+, the file name is just an other metadata (like ctime) and is not formely part of the path.


Moving a file in HFS+ is just changing its parent, not its name.

ctime on unix has nothing really to do with the path either, but rather the inode. Even on HFS, making another link to the file will update the ctime. In fact that is an old fashioned way of renaming on unix - link to the new path and unlink the old path (which temporarily changed the inode link count). Since BSD unix, rename is now done in the kernel rather than link/unlink, but it is still considered an event that is supposed to update the ctime.


I guess HFS must have a ctime, since link(2) updates it. So wouldn't this be considered a bug?





_______________________________________________
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: st_ctimespec not implemented?
      • From: Terry Lambert <email@hidden>
    • Re: st_ctimespec not implemented?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >st_ctimespec not implemented? (From: Chris <email@hidden>)
 >Re: st_ctimespec not implemented? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: st_ctimespec not implemented?
  • Next by Date: Re: which set of C++ headers?
  • Previous by thread: Re: st_ctimespec not implemented?
  • Next by thread: Re: st_ctimespec not implemented?
  • Index(es):
    • Date
    • Thread