Important: The information in this document is obsolete and should not be used for new development.
NewAlias
You use theNewAlias
function to create a complete alias record.
FUNCTION NewAlias (fromFile: FSSpecPtr; target: FSSpec; VAR alias: AliasHandle): OSErr;
fromFile
- The starting point for a relative path, to be used later in a relative search. If you do not need relative path information in the record, pass a
fromFile
value ofNIL
. If you wantNewAlias
to record relative path information, pass a pointer to a validFSSpec
record in this parameter. The two files or directories,fromFile
andtarget
, must reside on the same volume.target
- An
FSSpec
record for the target of the alias record.alias
- A handle to the newly created alias record. If the function fails to create an alias record, it sets
alias
toNIL
.DESCRIPTION
TheNewAlias
function creates an alias record that describes the specified target. It allocates the storage, fills in the record, and puts a record handle to that storage in thealias
parameter.NewAlias
always records the name and file or directory ID of the target, its creation date, the parent directory name and ID, and the volume name and creation date. It also records the full pathname of the target and a collection of other information relevant to locating the target, verifying the target, and mounting the target's volume, if necessary. You can haveNewAlias
store relative path information as well by supplying a starting point for a relative path (see "Relative Searches" on page 4-5 for a description of relative paths).ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forNewAlias
are
Trap macro Selector _AliasDispatch $0002 RESULT CODE
noErr 0 No error