Edit AllPages

Aliases are driving me nuts! How does one go about resolving aliases in a path string and getting the proper path string?

Take a look at NDAlias, which you will find a link to on the ObjectLibrary page. That’s a good page to read through from top to bottom.

You could also look at (Apple’s suggested method for resolving aliases). While it’s not in a nice ObjC wrapper, this might (probably but not definitely) be more efficient. If you don’t want to have to paste this code in every time you need to worry about an alias, you could make this into a function or method, using their path variable as an argument, and returning resolvedPath.

I’ve had trouble getting aliases to resolve in the middle of paths - the Apple code works great when the alias is at the end of the path. Here’s my refinement:

Here are just two more symbolic link resolvers:

curl -O (only HFS+ aliases)

curl -O (only Unix-style symbolic links)