Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

system_lseek() Function

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);

Return Values

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:

See Also

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