Setting file creation date
Setting file creation date
- Subject: Setting file creation date
- From: Dragan Milić <email@hidden>
- Date: Sat, 28 Jun 2014 20:28:58 +0200
So, copyfile() function doesn’t restore the creation date of a copied file to original’s creation date. That’s understandable since there’s not really such timestamp metadata available in Darwin (ok, there is st_birthtime in 64-bit environment). However, I need copy functionality to restore the creation date as well.
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.
-- 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