Important: The information in this document is obsolete and should not be used for new development.
PBClose
You can use thePBClose
function to close an open file.
FUNCTION PBClose (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock
- A pointer to a basic File Manager parameter block.
async
- A Boolean value that specifies asynchronous (
TRUE
) or synchronous (FALSE
) execution.
--> ioCompletion
ProcPtr
A pointer to a completion routine. <-- ioResult
OSErr
The result code of the function. --> ioRefNum
Integer
A file reference number. DESCRIPTION
ThePBClose
function writes the contents of the access path buffer specified by theioRefNum
field to the volume and removes the access path.
- WARNING
- Some information stored on the volume won't be updated until
PBFlushVol
is called.- WARNING
- Do not call
PBClose
with a file reference number of a file that has already been closed. Attempting to close the same file twice may result in loss of data on a volume. See "File Control Blocks" on page 2-81 for a description of how this can happen.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBClose
is_Close
.RESULT CODES
noErr 0 No error ioErr -36 I/O error fnOpnErr -38 File not open fnfErr -43 File not found rfNumErr -51 Bad reference number