The system_lseek function sets the file position of a file. This position affects where data from system_fread or system_fwrite is read or written.
int system_lseek(SYS_FILE fd, int offset, int whence);
The offset, in bytes, of the new position from the beginning of the file if the operation succeeds, or -1 if the operation fails.
SYS_FILE fd is the platform-independent file descriptor.
int offset is a number of bytes relative to whence. This value may be negative.
int whence is one of the following constants:
SEEK_SET, from the beginning of the file.
SEEK_CUR, from the current file position.
SEEK_END, from the end of the file.
system_errmsg() Function, system_fopenRO() Function, system_fopenRW() Function, system_fopenWA() Function, system_fread() Function, system_fwrite() Function, system_fwrite_atomic() Function, system_flock() Function, system_ulock() Function, system_fclose() Function