Important: The information in this document is obsolete and should not be used for new development.
HSetFLock
You can use theHSetFLock
function 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
TheHSetFLock
function 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
PBHGetVolParms
function indicates that the volume supports folder locking (that is, thebHasFolderLock
bit of thevMAttrib
field is set), you can useHSetFLock
to lock a directory.RESULT CODES