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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to