Function

FSUpdateAlias

Updates an alias record for a specified target.

Declaration

OSErr FSUpdateAlias(const FSRef *fromFile, const FSRef *target, AliasHandle alias, Boolean *wasChanged);

Parameters

fromFile

A pointer to the starting point for a relative search. You may pass NULL if you do not need relative search information in the alias record. The two files or directories specified in the fromFile and target parameters must reside on the same volume.

target

A pointer to the target of the alias record.

alias

A handle to the alias record to be updated.

wasChanged

A pointer to a Boolean value that, on output, indicates whether the newly constructed alias record is different from the old one. If the new record is exactly the same as the old one, the value is false. Otherwise, the value is true. Check this parameter to determine whether you need to save an updated record.

Return Value

A result code.

Discussion

This function rebuilds the entire alias record and fills it in as the FSNewAlias function would. The FSUpdateAlias function always creates a complete alias record. When you use FSUpdateAlias to update a minimal alias record, you convert the minimal record to a complete record.

See Also

Creating and Updating Alias Records

FSNewAlias

Creates a new alias record, given a target file or directory.

Deprecated
FSNewAliasUnicode

Creates a new alias record, given the Unicode name and parent directory of the target.

Deprecated
FSNewAliasFromPath

Creates a new alias record, given the pathname of the target file or directory.

Deprecated
FSNewAliasMinimal

Creates a new minimal alias record, given a target file or directory.

Deprecated
FSNewAliasMinimalUnicode

Creates a minimal alias, given the Unicode name and parent directory of the target.

Deprecated