Preventing Alias Failure
An alias is a dynamic reference to an object. The original may be moved to another place within the same filesystem, without breaking the link. The operating system stores several pieces of information about the original in the resource fork of the alias file. Examples of the information used to locate the original are:
- path
- file ID
- directory ID
- name
- file size
Since any of these properties can change without the computer's knowledge, as a result of user activity, various search algorithms are used to find the most plausible target. This fault-tolerance sets the alias apart from similar functions in some other operating systems, such as the Unix symbolic link or the Microsoft Windows shortcut, at the expense of increased complexity and unpredictability. For example, an application can be moved from one directory to another within the same filesystem, but an existing alias would still launch the same application when double-clicked.
The question can arise of how an alias should work if a file is moved, and then a file is created with the same name as the original moved file, since the alias can be used to locate both the original name and the new location of the original file. With symbolic links the reference is unambiguous and refers to the new file. Before Mac OS 10.2, however, such an ambiguous alias would consistently find the original moved file, rather than the recreated file. From Mac OS 10.2, the new file is found, matching the behaviour of symbolic links . OS X applications can programmatically use the old behavior if required.
Aliases are similar in operation to shadows in the graphical Workplace Shell of the OS/2 operating system.
Read more about this topic: Alias (Mac OS)
Famous quotes containing the words preventing and/or failure:
“In a language known to us, we have substituted the opacity of the sounds with the transparence of the ideas. But a language we do not know is a closed place in which the one we love can deceive us, making us, locked outside and convulsed in our impotence, incapable of seeing or preventing anything.”
—Marcel Proust (18711922)
“I read less and less. I have not forgiven books for their failure to tell me the truth and make me happy.”
—Mason Cooley (b. 1927)