Desktop shortcuts: how do they work

Gwailo

B.A. Economics (Hon)
I'm curious, I opened up the terminal and noticed that my folder shortcuts are files and not directories (symlnks), which is no great surprise.

What did surprise me was that cat "DevTools" returned nothing...

So this is a file with no content? Does it have to do with the resource/data fork (which are separated files in X, no?)?

Thanks! :)
 
Actually, it is an "alias" which stores its destination not in the file itself but in the resource fork for that file, causing it to point to the right place. This is very similar to the unix "ln" command which creates a link my making a new filename pointing to an existing file. In fact, you can use the ln command to achieve much the same effect on OS X.
The advantages of the alias method, though, is that you can move the destination file and the source will still point to it!

:D
 
Back
Top