- stream
- FILE stream to seek.
- offset
- Number of bytes to add to the the file offset specified by whence.
- origin
- File offset to add offset to.
Returns 0 if successful; otherwise -1 is returned and Stdlib.GetLastError indicates the error.
Usage
The following errors are specified:
Error Details Errno.EBADF The stream argument is not not a seekable stream Errno.EINVAL The whence argument is invalid or the resulting file-position indicator would be set to a negative value. Errno.EOVERFLOW The resulting file offset would be a value which cannot be represented correctly in an object of type stem.Int64 for Stdlib.fseek() and Stdlib.ftell(). Errno.ESPIPE The file descriptor underlying stream is associated with a pipe or FIFO or file-position indicator value is unspecified (see Stdlib.ungetc(3)). fseek may also fail for any of the error specified for the routines Stdlib.fflush(3), Syscall.fstat(2), Syscall.lseek(2), and Stdlib.malloc(3)