File Path Tracking

Daniel Hazelbaker daniel at highdesertchurch.com
Mon Oct 15 16:26:24 PDT 2007


On Oct 15, 2007, at 2:58 PM, Markus Hitter wrote:

>
> Am 15.10.2007 um 21:17 schrieb Uli Kusterer:
>
>> Am 15.10.2007 um 21:10 schrieb Daniel Hazelbaker:
>>> I have a program that keeps track of files by using the Unix Path  
>>> to the file (as that is what is used to open and work with the  
>>> files when the time comes).
>>
>> Check out Aliases, which can be used for this and are reliable.
>
> Aliases don't work if you access the same file at the same path  
> while one of the accesses is local while the other is remote, like:

Okay, well... here is the exact scenario I have:

All media files (quicktime movies, still pictures, probably audio at  
some point, etc.) are stored on the network volume "HDCServer", which  
is shared from the server "fileserver".  What I could potentially  
have happen is this (psuedo):

Machine 1:
mount fileserver:HDCServer /Volumes/HDCServer

Machine 2:
mount fileserver:HDCServer /Volumes/HDCServer

Machine 3 (FUS):
User 1: mount fileserver:HDCServer /Volumes/HDCServer
User 2: mount fileserver:HDCServer /Volumes/HDCServer\ 2

The problem I run into is the final one.  When the HDCServer gets  
mounted to a different "Volumes" path it doesn't know how to find it  
anymore (to be specific, it gets access denied errors as User 2  
doesn't have access to User 1's HDCServer mount).  Now all of these  
"mounts" will be network based, however, I could foresee in the  
future a use of dual local/network for other libraries.

As I understand you, this scenario would work since all are network  
instead of local.  If I try to mix local / network then I will run  
into issues.  Is there a way I can store the "alias data" (i.e. see  
com.apple.recentitems.plist) and then have the alias "system"  
translate the alias back into a regular unix path which I can open?   
In this recent items example all it stores is the alias data, so it  
seems like if two people have an alias to the same file, one local  
another via network, and they try to open the same file from the  
alias in their recent list they would come up with some kind of  
hanged state, but I have never heard of that happening?

It would be nice to have it automatically try to mount the server if  
it is not, but I can live without that ability if it lets me pick up  
a "traveling" mount path.

> Markus

Daniel


More information about the MacOSX-dev mailing list