Re: getting file creation date from NTFS
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 06:12:29 -0500
On May 23, 2010, at 5:33 AM, Angelo Chen wrote:
> I think FSGetCatalogInfo (&ref, kFSCatInfoCreateDate, &info, NULL, NULL, NULL); info.createDate has the creation date, can see it clearly in debugger, problem is, how to convert it into NSDate
You should use UCConvertUTCDateTimeToCFAbsoluteTime() and CFDateCreate(). Since CFDate is toll-free bridged with NSDate, you can just cast the result. (You do have to be mindful of memory-management issues, of course.)
You can also feed the CFAbsoluteTime value to +[NSDate dateWithTimeIntervalSinceReferenceDate:], since the reference date is the same between the two.
Regards,
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