About the Alias Manager
About the Alias Manager Information about making an AliasRecord
The Alias Manager allows your application to establish and resolve
alias records, which are data structures that describe file system objects
(that is, files, directories, and volumes). You create an AliasRecord to take a
fingerprint of a file system object, usually a file, that you might need to locate
again later. You can store the AliasRecord, instead of a standard file
specification, and then let the Alias Manager find the file again when it's
needed. The Alias Manager contains algorithms for locating files that have
been moved, renamed, copied, or re stored from backup.
Note: The Alias Manager lets you exploit an AliasRecord. It does
not directly manipulate Finder aliases, which are created and
managed by the user through the Finder. The Finder Interface
describes Finder aliases and how your application can accommodate
them.
The Alias Manager is available only in system software version 7.0 or
later. Call the Gestalt function, described in the section en titled
Compatibility Guidelines , to determine whether the Alias Manager is
present.
Read the accompanying Alias Manager sections if you want your application
to create and resolve an AliasRecord. You might store an AliasRecord, for
example, to identify a customized dictionary from within a word- processing
document. When the user runs a spelling checker on the document, your
application can ask the Alias Manager to resolve the record to find the
correct dictionary.
To use these sections, you should be familiar with the File Manager
conventions for identifying files, directories, and volumes.
The Alias Manager will create and resolves an AliasRecord. The next
section, About Alias Records, describes how you can use an AliasRecord.
In general, you should use the Alias Manager to create an AliasRecord
whenever you find yourself storing a specific file description, such as filename
and parent directory ID. The Alias Manager stores this information and more
in the AliasRecord, and it also provides a set of search strategies for resolving
the record later. The search strategies are described later in the section
en titled Resolving Alias Records under
Using the Alias Manager.
You can use the Alias Manager to:
create an AliasRecord
resolve an AliasRecord
update an AliasRecord
get information about an AliasRecord
The Alias Manager can track files and directories across volumes. If the
target of an AliasRecord is on an unmounted AppleShare volume, the
Alias Manager automatically mounts the volume when it resolves the alias.
If the target object is on an unmounted ejectable volume, the Alias Manager
prompts the user to insert the volume.
When the Alias Manager creates an AliasRecord, it allocates the storage,
fills in the record, and returns a handle to it. Your application is responsible
for storing the record and retrieving it when needed. Your application must
also supply strategies for handling various alias-resolution problems.
To help you understand and use the Alias Manager, the information in the
accompanying sections provides:
an overview of an AliasRecord
a description of how the Alias Manager resolves an AliasRecord
specific techniques for using the Alias Manager in your application.