Re: Globally, persistently identifying a file
Re: Globally, persistently identifying a file
- Subject: Re: Globally, persistently identifying a file
- From: "Stephen J. Butler" <email@hidden>
- Date: Thu, 26 Apr 2012 17:44:10 -0500
On Thu, Apr 26, 2012 at 2:09 PM, Nick Zitzmann <email@hidden> wrote:
> I need to be able to identify a file globally and persistently (such that it still works after moving or overwriting a file, or re-mounting a volume, or after rebooting). File paths don't work, because even though they're technically unique, they break if the file or its underlying path components are renamed or moved. Carbon FSSpec data structures don't work, because they're not available to 64-bit apps. Cocoa NSURLFileResourceIdentifier objects don't work, because they aren't persistent across reboots.
Are these your own filetypes that you're monitoring?
I ask because you could attach a GUID to a file (maybe via an extended
attribute) then write a MetaData importer that adds your attribute to
the Spotlight database. Then finding your file again is as easy as
querying Spotlight.
However, this won't work if you need to track arbitrary filetypes
since you can only have one importer per UTI.
_______________________________________________
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