Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

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


PBHRstFLock

You can use the PBHRstFLock function to unlock a file.

FUNCTION PBHRstFLock (paramBlock: HParmBlkPtr; async: Boolean): 
                        OSErr;
paramBlock
A pointer to a basic HFS parameter block.
async
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
-->ioNamePtrStringPtrA pointer to a pathname.
-->ioVRefNumIntegerA volume specification.
-->ioDirIDLongIntA directory ID.

DESCRIPTION
The PBHRstFLock function unlocks the file with the name pointed to by ioNamePtr on the volume specified by ioVRefNum. Access paths currently in use aren't affected.

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 PBHRstFLock to unlock a directory.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBHRstFLock is _HRstFLock.

RESULT CODES
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