• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: question about last used date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about last used date


  • Subject: Re: question about last used date
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 14 Mar 2016 18:21:23 -0700

> On Mar 14, 2016, at 6:11 PM, Rick C. <email@hidden> wrote:
>
> 2.  NSURLContentAccessDateKey returns the current date like mentioned here - http://stackoverflow.com/questions/13914600/get-the-real-last-opened-date <http://stackoverflow.com/questions/13914600/get-the-real-last-opened-date>
> 3.  The same problem with st_atimespec it returns the current date

The thread you linked to doesn’t say the _current_ date, it says "very strange dates, usually near 3:00-3:30 AM, today or yesterday”. That’s probably the last time the file was scanned by some system daemon like the Spotlight indexer or Time Machine, as I said in my previous reply.

> So from what I see there is no real alternative to kMDItemLastUsedDate if that value is missing.  Additional thoughts?


It sounds like what you want is a high level “last time this file was opened in a GUI application by a user command” property, which isn’t something the filesystem knows anything about. Higher-level frameworks seem to update kMDItemLastUsedDate to implement this. If that data is lost, I don’t think you have an alternative.

—Jens
_______________________________________________

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


  • Follow-Ups:
    • Re: question about last used date
      • From: "Rick C." <email@hidden>
References: 
 >question about last used date (From: "Rick C." <email@hidden>)
 >Re: question about last used date (From: Jens Alfke <email@hidden>)
 >Re: question about last used date (From: Fritz Anderson <email@hidden>)
 >Re: question about last used date (From: "Rick C." <email@hidden>)

  • Prev by Date: Re: question about last used date
  • Next by Date: Another AppleScript-ObjC Dictionary question
  • Previous by thread: Re: question about last used date
  • Next by thread: Re: question about last used date
  • Index(es):
    • Date
    • Thread