Important: The information in this document is obsolete and should not be used for new development.
UpdateAlias
You use theUpdateAlias
function to update an alias record.
FUNCTION UpdateAlias (fromFile: FSSpecPtr; target: FSSpec; alias: AliasHandle; VAR wasChanged: Boolean): 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
afromFile
value ofNIL
. If you wantUpdateAlias
to record
relative path information, pass a pointer to a validFSSpec
record
in this parameter.target
- The target of the alias record. This parameter must be a valid
FSSpec
record.alias
- A handle to the alias record to be updated.
wasChanged
- A Boolean value indicating whether the newly constructed alias record is exactly the same as the old one. If the new record is the same as the old one,
UpdateAlias
sets thewasChanged
parameter toFALSE
. Otherwise, it sets it toTRUE
. Check this parameter to determine whether you need to save an updated record.DESCRIPTION
TheUpdateAlias
function updates the alias record pointed to by thealias
parameter so that it describes the target specified by thetarget
parameter. TheUpdateAlias
function rebuilds the entire alias record and fills it in as theNewAlias
function would.The
UpdateAlias
function always creates a complete alias record. When you useUpdateAlias
to update a minimal alias record, you convert the minimal record to a complete record.SPECIAL CONSIDERATIONS
The two files or directories,fromFile
andtarget
, must reside on the same volume.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forUpdateAlias
are
Trap macro Selector _AliasDispatch $0006 RESULT CODES
noErr 0 No error paramErr -50 The value of the target
oralias
parameter, or both, isNIL
, or the alias record is corrupt