• 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: track files even if moved
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: track files even if moved


  • Subject: Re: track files even if moved
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 30 Dec 2010 05:38:07 -0600

On Dec 30, 2010, at 2:39 AM, Wesley Smith wrote:

> I was looking at NSFileManager and the low-level file manage docs,
> trying to figure out a way to track a file no matter where it gets
> moved on the system, even if my app is not running.  For example,
> let's say my app references a document, but doesn't store a copy of
> that document.  I'd like to guarantee that I can find that document
> the next time my app launches even if it gets moved by the user in,
> say, Finder when my app isn't running.  From looking at the file
> attributes, I gather that the Inode aka st_ino aka
> NSFileSystemFileNumber and be used to uniquely identify a file on the
> system.  What I haven't found yet is a way to go from this value to a
> URL.  Does such a thing exist?  Is there another way to properly track
> files on 10.5 and above that I'm missing?

For 10.5, you want alias records.  I gather that lots of people use the third-party NDAlias code for this:
http://www.cocoadev.com/index.pl?NDAlias

With 10.6, Apple moved to bookmark data, which is conceptually similar and somewhat interoperable.

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

References: 
 >track files even if moved (From: Wesley Smith <email@hidden>)

  • Prev by Date: Re: Detecting MouseUp in NSSplitview
  • Next by Date: Re: Detecting MouseUp in NSSplitview
  • Previous by thread: track files even if moved
  • Next by thread: Re: track files even if moved
  • Index(es):
    • Date
    • Thread