Important: The information in this document is obsolete and should not be used for new development.
FSpSetFLock
You can use theFSpSetFLockfunction to lock a file.
FUNCTION FSpSetFLock (spec: FSSpec): OSErr;
- spec
- An
FSSpecrecord specifying the file to lock.DESCRIPTION
The FSpSetFLock 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
PBHGetVolParmsfunction indicates that the volume supports folder locking (that is, thebHasFolderLockbit of thevMAttribfield is set), you can useFSpSetFLockto lock a directory.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for FSpSetFLock are
Trap macro Selector _HighLevelHFSDispatch $0009 RESULT CODES