Re: getting file creation date from NTFS
Re: getting file creation date from NTFS
- Subject: Re: getting file creation date from NTFS
- From: Alastair Houghton <email@hidden>
- Date: Sun, 23 May 2010 18:47:11 +0100
On 23 May 2010, at 18:39, Paul Sanders wrote:
>> 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.
>
> I'm not certain, but I think you have to use stat64 in 32 bit Leopard builds to get st_birthtimespec. stat64 is deprecated in Snow Leopard, but seems unlikely to go away. I guess a belt-and-braces type of person would test the system version and weak link.
At the BSD layer, getattrlist() is the way to go here, with the ATTR_CMN_CRTIME attribute.
Others have already suggested using the Carbon API; the benefit of using Carbon is that it will generally emulate attributes that don't exist on the underlying filesystem. This may be desirable, or it may not, depending on your application.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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