PBRstFLockSync
PBRstFLock Unlock a file (allow write access)
#include <Files.h> File Manager (PBxxx)
OSErr PBRstFLock(pb, async ); Boolean async ; 0=await completion; 1=immediate return PBRstFLock unlocks a file. It undoes the effect of PBSetFLock, allowing
the file to be deleted or modified.
pb is the address of an 80-byte FileParam structure. The relevant fields are as follows:
Out-In Name Type Size Offset Description
-> ioCompletion ProcPtr 4 12 Completion routine address (if async =TRUE) -> ioNamePtr StringPtr 4 18 Address of full or partial path/ filename -> ioVRefNum short 2 22 Volume, drive, or directory reference
<- ioResult OSErr 2 16 Error Code (0=no error, 1=not done yet) async is a Boolean value. Use FALSE for normal (synchronous) operation or TRUE to enqueue the request and resume control immediately. See Async I/O.
noErr (0) No error
extFSErr (-58) External file system
fnfErr (-43) File not found
ioErr (-36) I/O error
nsvErr (-35) No such volume
vLckdErr (-46) Volume is locked
wPrErr (-44) Diskette is write-protected
Notes: See PBSetFLock for related information.
Be sure to call PBFlushVol to check that the change is written to the disk.