> Is there any way to create an alternative path to a directory, that will 
> remain valid even if the directory is moved?
> 
If you mean a posix level path, there is no way that I'm aware of.


> Otherwise, the only other way I can think of is to create a hard-link to the 
> directory at some temporary location and use 
> 
You can not create hard-links to directories for this purpose.  Hard-links to 
directories have a ton of restrictions that are necessary to prevent cycles in 
the namespace and thus are really only useful for TimeMachine (which is what 
they were invented for).

> (There’s also the option of watching FSEvents to notice when the directory 
> has been moved. There are obvious race conditions associated with this, 
> though; I’m not going there.)
> 
That could work.  Or you could create a CF/NSURL Bookmark to locate the 
document when the user tries to open it and then patch up any paths it stores 
before you ask your library of db code to open the db.


--dominic


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (Filesystem-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/filesystem-dev/archive%40mail-archive.com

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

Reply via email to