• 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: getting file creation date from NTFS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting file creation date from NTFS


  • Subject: Re: getting file creation date from NTFS
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 23 May 2010 04:56:31 -0500

On May 23, 2010, at 4:19 AM, Paul Sanders wrote:

> Assuming that these figures come from stat (man -S 2 stat for details), it should be in something called st_birthtime.

Yes, although the stat structure only has the st_birthtimespec field if you build with 64-bit inodes enabled.  This is the default on Snow Leopard or for 64-bit, but not for 32-bit on Leopard or earlier.  Unfortunately, it seems that FSMegaInfo is not 64-bit-inode aware.  It will never print the birth time.

It's not hard to update it to be aware of that, though.

>  st_atime refers to the last time the file was accessed. So, either call stat yourself or, better perhaps, go via the file manager:
>
> http://developer.apple.com/mac/library/DOCUMENTATION/Carbon/Reference/File_Manager/Reference/reference.html

FSMegaInfo can be used to exercise that API, too.  It's not just for 'stat'.  To get the creation date:

./FSMegaInfo -vv FSGetCatalogInfo -kFSCatInfoCreateDate /path/to/file

or, for everything:

./FSMegaInfo -vv FSGetCatalogInfo -kFSCatInfoGettableInfo /path/to/file

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: getting file creation date from NTFS
      • From: "Paul Sanders" <email@hidden>
    • Re: getting file creation date from NTFS
      • From: Angelo Chen <email@hidden>
References: 
 >Re: getting file creation date from NTFS (From: Angelo Chen <email@hidden>)
 >Re: getting file creation date from NTFS (From: "Paul Sanders" <email@hidden>)

  • Prev by Date: Re: getting file creation date from NTFS
  • Next by Date: Re: getting file creation date from NTFS
  • Previous by thread: Re: getting file creation date from NTFS
  • Next by thread: Re: getting file creation date from NTFS
  • Index(es):
    • Date
    • Thread