DOSINT64 oldpos = FSeek(APTR handle, DOSINT64 pos, int mode);
HWFSEEKMODE_CURRENT:
HWFSEEKMODE_BEGINNING:
HWFSEEKMODE_END:
Note that FSeek()
is often called with a 0 zero position and HWFSEEKMODE_CURRENT
to query the position of the read/write cursor.
If there was an error, FSeek()
has to return -1.
If you set the HWFOPENFLAGS_NOSEEK
flag in your FOpen() implementation,
your FSeek()
implementation only has to support rewinding the file and querying
the position of the cursor. In terms of code, this means that FSeek()
only has to
support the following two operations if HWFOPENFLAGS_NOSEEK
is set:
FSeek(fh, 0, HWFSEEKMODE_BEGINNING); // rewind pos = FSeek(fh, 0, HFSEEKMODE_CURRENT); // query cursor position |
For any other operation, it has to return -1, i.e. an error has occurred.
This function must be implemented in a thread-safe manner.