rohan a wrote:
Hello, I am writing a backup/restore utility on Mac OS X and faced some issues with Alias files. Alias files resolve their targets using the target pathname and then its unique File ID.
Consider I have an alias file named *alias* pointing to *user.txt*. If I backup and restore both *alias* and *user.txt*, then *alias* will no longer point to *user.txt*(If I restore it to some other location) as the file ID of *user.txt* will have changed after the restore(because I am creating a new file).
Even if I restore it to the same location, it will point to the right file only till user.txt is moved to some other location.
Here, the alias files will start pointing to arbitrary files which will be a complete mess. Does Mac OS X provide any API's to deal with Alias files.
I looked up the Alias manager reference which says that it can only create "alias records" and not "alias files" How do I deal with this problem?