PBFlushFile
You can use the PBFlushFile function to write the contents of a file's access path buffer.
FUNCTION PBFlushFile (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
The PBFlushFile function writes the contents of the access path buffer indicated by ioRefNum to the volume and then updates the file's entry in the volume catalog.
- WARNING
- Some information stored on the volume won't be correct until
PBFlushVol is called.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBFlushFile is _FlushFile.
RESULT CODES
| noErr | 0 | No error |
| nsvErr | -35 | Volume not found |
| ioErr | -36 | I/O error |
| fnOpnErr | -38 | File not open |
| fnfErr | -43 | File not found |
| rfNumErr | -51 | Bad reference number |
| extFSErr | -58 | External file system |