The system_lseek function sets the file position of a file. This function 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 succeeded, or -1 if the operation failed.
SYS_FILE fd is the platform-independent file descriptor.
int offset is a number of bytes relative to whence. It 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, system_fopenRO, system_fopenRW, system_fopenWA, system_fread, system_fwrite, system_fwrite_atomic, system_flock, system_ulock, system_fclose