Re: question about last used date
Re: question about last used date
- Subject: Re: question about last used date
- From: Fritz Anderson <email@hidden>
- Date: Mon, 14 Mar 2016 12:04:13 -0500
> On 14 Mar 2016, at 10:39 AM, Jens Alfke <email@hidden> wrote:
>
> Unix filesystems do keep a last-accessed date for files, but it looks like NSFileManager doesn’t expose an attribute for it. You can call stat() and get the st_atimespec field of the result.
NSURL *Resource* methods can get at NSURLContentAccessDateKey:
> The time at which the resource was most recently accessed, returned as an NSDate object if the volume supports accessdates, or nil if access dates are unsupported (read-only).
The resource stuff is painful, especially in Swift, but indispensable.
— F
_______________________________________________
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