PBGetEOF
You can use the PBGetEOF function to determine the current logical end-of-file of an open file.
FUNCTION PBGetEOF (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. |
| <-- | ioMisc | Ptr | The logical end-of-file. |
DESCRIPTION
The PBGetEOF function returns, in the ioMisc field, the logical end-of-file of the specified file. Because ioMisc is of type Ptr, you'll need to coerce the value to type LongInt to interpret the value correctly.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBGetEOF is _GetEOF.
RESULT CODES
| noErr | 0 | No error |
| ioErr | -36 | I/O error |
| fnOpnErr | -38 | File not open |
| rfNumErr | -51 | Bad reference number |
| afpAccessDenied | -5000 | User does not have the correct access to the file |