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
High-Level File Access Routines / Manipulating the File Mark


GetFPos

You can use the GetFPos function to determine the current position of the mark before reading from or writing to an open file.

FUNCTION GetFPos (refNum: Integer; VAR filePos: LongInt): OSErr;
refNum
The file reference number of an open file.
filePos
On output, the current position of the mark.
DESCRIPTION
The GetFPos function returns, in the filePos parameter, the current position of the file mark for the specified open file. The position value is zero-based; that is, the value of filePos is 0 if the file mark is positioned at the beginning of the file.

RESULT CODES
noErr0No error
ioErr-36I/O error
fnOpnErr-38File not open
rfNumErr-51Bad reference number
gfpErr-52Error during GetFPos

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996