Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
High-Level HFS Routines / Accessing Information About Files and Directories


You can use the HRstFLock function to unlock a file.

FUNCTION HRstFLock (vRefNum: Integer; dirID: LongInt; 
                     fileName: Str255): OSErr;
A volume reference number, a working directory reference number, or 0 for the default volume.
A directory ID.
The name of the file.
The HRstFLock function unlocks a file.

If the PBHGetVolParms function indicates that the volume supports folder locking (that is, the bHasFolderLock bit of the vMAttrib field is set), you can use HRstFLock to unlock a directory.

noErr0No error
nsvErr-35No such volume
ioErr-36I/O error
fnfErr-43File not found
wPrErr-44Hardware volume lock
vLckdErr-46Software volume lock
dirNFErr-120Directory not found or incomplete pathname
afpAccessDenied-5000User does not have the correct access to the file
afpObjectTypeErr-5025Folder locking not supported by volume

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996