Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 4 - Alias Manager / About the Alias Manager

Alias Records

An alias record is a data structure that describes a file, directory, or volume. The record contains

By storing alias records, you can allow your users to create a robust connection to a file--that is, a connection that can survive the moving or renaming of the target file. The Finder introduced in system software version 7.0, for example, stores alias records in aliases created by the user to represent other files or folders. The Edition Manager uses alias records to support data sharing among separate documents.

An alias record is a reliable way to identify a file system object when your application is communicating with a process that might be running on a different machine.

The creation of an alias record has no effect on the target of the record, except to establish a file ID reference for the target file if one did not previously exist. (See the chapter "File Manager" in this book for a description of file IDs and file ID references.)

The alias record contains only two fields of public information available to your application. The bulk of the record is managed privately by the Alias Manager.

TYPE AliasRecord =
      userType:   OSType;        {application's signature}
      aliasSize:  Integer;       {size of record when created}
      {variable-length private data}
Your application can store, in the userType field, its own signature or any other
data that fits into 4 bytes. When the Alias Manager creates an alias record, it stores 0
in that field.

The Alias Manager stores, in the aliasSize field, the size assigned to the record at the time of its creation. Knowing the starting size allows you to store and retrieve data of your own at the end of the record (see "Customizing Alias Records" on page 4-13). An alias record is typically 200 to 300 bytes long.

The private Alias Manager data includes all of the location, verification, and mounting information needed to resolve the alias record with the various search strategies described in this chapter.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996