GetFPos
GetFPos Obtain position of the file mark of an open file short fRefNum ; file reference, as obtained via FSOpen long *filePos ; receives the current file position
GetFPos returns the current position of the file mark (the file address at which the next read or write will begin).
fRefNum is the reference number of an open file. See FSOpen and OpenRF. filePos is the address of a 32-bit long integer. Upon return, it will contain
the current value of the file's mark; i.e., an offset in bytes from the
start of the file.
noErr (0) No error
eofErr (-39) End of file
extFSErr (-58) External file system
fnOpnErr (-38) File not open
ioErr (-36) I/O error
rfNumErr (-51) fRefNum is invalid
Notes: You can use GetFPos before attempting a read, and compare the return value of filePos to the location of file's logical end-of-file (see GetEOF). See OpenRF for an example usage of this function. The SetFPos function performs the complementary function of setting the file mark, in preparation for reading from or writing to the file at that
position.