Important: The information in this document is obsolete and should not be used for new development.
HSetFLock
You can use theHSetFLockfunction to lock a file.
FUNCTION HSetFLock (vRefNum: Integer; dirID: LongInt; fileName: Str255): OSErr;
vRefNum- A volume reference number, a working directory reference number, or 0 for the default volume.
dirID- A directory ID.
fileName- The name of the file.
DESCRIPTION
TheHSetFLockfunction locks a file. After you lock a file, all new access paths to that file are read-only. This function has no effect on existing access paths.If the
PBHGetVolParmsfunction indicates that the volume supports folder locking (that is, thebHasFolderLockbit of thevMAttribfield is set), you can useHSetFLockto lock a directory.RESULT CODES