int32 lseek(int fd, int32 offset, int from)

## Method Description

This method is used to position the internal file pointer existing for each file descriptor.

fd is a file descriptor corresponding to an already opened file. This must be a descriptor returned by the library functions, and not by the standard ones.

offset should specify the offset, in bytes, of the new position of the pointer, relative to the position given by the third argument.

from replaces the 'whence' argument of the Unix manual. It must be one of those values :
SEEK_SET : The offset specify an absolue position from the beginning of the file.
SEEK_CUR : offset is relative to the current position.
SEEK_END ; offset is relative to the end of the file.
If the SMB server respect the protocol, any attempt to position offset after the end of the file should fill the gap with 0.

This method returns the new position of the file pointer, relative to the beginning of the file.
On error, -1 is returned and error() will return the corresponding error code.

## See also :

Reads from an "opened" file descriptor. Does caching.
int read(int fd, void *buf, uint32 count)

Writes to "opened" file descriptor. Does caching.
int write(int fd, void *buf, uint32 count)

Copyright © Nicolas Brodu, 1999 - 2000