Re: Setting file creation date
Re: Setting file creation date
- Subject: Re: Setting file creation date
- From: Dragan Milić <email@hidden>
- Date: Tue, 01 Jul 2014 21:57:13 +0200
On sub 28.06.2014., at 21.27, Jens Alfke wrote:
> On Jun 28, 2014, at 12:07 PM, Dragan Milić wrote:
>
>> No, I don’t want to use deprecated APIs. The whole point of rewriting an application and going for copyfile() was to get rid of the deprecated File Manager API.
>
> It’s not deprecated. Some of its older functions are, but not the entire API.
As of 10.8, all functions (thus, the entire API) are deprecated:
https://developer.apple.com/library/mac/releasenotes/General/CarbonCoreDeprecations/#//apple_ref/doc/uid/TP40012224-CH1-SW2
https://developer.apple.com/library/mac/documentation/Carbon/reference/File_Manager/Reference/reference.html
On sub 28.06.2014., at 22.18, James Peach wrote:
> On Jun 28, 2014, at 11:28 AM, Dragan Milić wrote:
>
>> I can set creation date from Cocoa using -[NSURL setResourceValue:forKey:error:], where key=NSURLCreationDateKey, but I’m interested if there’s a way to do it without jumping into Cocoa and staying on the POSIX level. st_birthtime doesn’t seem settable, at least not with the utimes()/futimes() call.
>
> Use setattrlist(2) to set ATTR_CMN_CRTIME
Thanks.
-- Dragan
_______________________________________________
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