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 File Access Routines / Manipulating the End-of-File


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.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
-->ioRefNumIntegerA file reference number.
<--ioMiscPtrThe 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
noErr0No error
ioErr-36I/O error
fnOpnErr-38File not open
rfNumErr-51Bad reference number
afpAccessDenied-5000User does not have the correct access to the file

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996