Important: The information in this document is obsolete and should not be used for new development.
PBClose
You can use thePBClosefunction 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.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioRefNumIntegerA file reference number. DESCRIPTION
ThePBClosefunction writes the contents of the access path buffer specified by theioRefNumfield to the volume and removes the access path.
- WARNING
- Some information stored on the volume won't be updated until
PBFlushVolis called.![]()
- WARNING
- Do not call
PBClosewith 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 forPBCloseis_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