Relative aliases

Christiaan Hofman cmhofman at gmail.com
Fri Oct 26 08:28:13 PDT 2007


We are trying to create aliases using the Alias Manager with a  
relative path. The idea is to store links to document-relative  
external files,. This should work on two different machines with the  
same (relative) setup (say a computer at home and on your work), or  
when the document is moved together with the linked external files.

Until now all attempts have failed: the relative paths seem to be  
completely ignored, and only the absolute path and fileID seem to be  
used.

For example if I create an alias with FSRefs to a file with as base  
location (fromFile argument) the file's folder, I copy the file to  
another location, and try to resolve the alias (or a copy of it) with  
as base location the folder of the copy, it does not find the copy,  
even though obviously the relative path should point to the copy. I'm  
creating the alias using FSNewAlias with both a fromFile and a  
target, and I'm resolving the alias using either FSResolveAlias, or  
FSMatchAlias with kARMSearch | kARMSearchRelFirst in the rulesMask.

Does this problem sound familiar t anybody on the list? And is there  
something I could have done wrong? Or are aliases simply unable to  
work with relative paths (unlike what the documentation says)?

Thanks,
Christiaan



More information about the MacOSX-dev mailing list