Alias (Mac OS) - Preventing Alias Failure

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:

    After the earthquake, which had destroyed three-quarters of Lisbon, the country’s wise men had found no more efficacious means of preventing total ruin than to give the people a fine auto-da-fé.
    Voltaire [François Marie Arouet] (1694–1778)

    All health and success does me good, however far off and withdrawn it may appear; all disease and failure helps to make me sad and does me evil, however much sympathy it may have with me or I with it.
    Henry David Thoreau (1817–1862)