• 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: Filesystem path that works even after a dir is moved?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filesystem path that works even after a dir is moved?


  • Subject: Re: Filesystem path that works even after a dir is moved?
  • From: Dominic Giampaolo <email@hidden>
  • Date: Mon, 02 Nov 2015 15:39:44 -0500

> 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Filesystem path that works even after a dir is moved?
      • From: Jens Alfke <email@hidden>
References: 
 >Filesystem path that works even after a dir is moved? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Filesystem path that works even after a dir is moved?
  • Next by Date: Re: Filesystem path that works even after a dir is moved?
  • Previous by thread: Filesystem path that works even after a dir is moved?
  • Next by thread: Re: Filesystem path that works even after a dir is moved?
  • Index(es):
    • Date
    • Thread