Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>lseek</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
lseek
=====

Syntax
------

     #include <unistd.h>
     
     off_t lseek(int fd, off_t offset, int whence);

Description
-----------

This function moves the file pointer for FD according to MODE:

`SEEK_SET'
     The file pointer is moved to the offset specified.

`SEEK_CUR'
     The file pointer is moved relative to its current position.

`SEEK_END'
     The file pointer is moved to a position OFFSET bytes from the end
     of the file.  The offset is usually nonpositive in this case.

Return Value
------------

The new offset is returned.

Example
-------

     lseek(fd, 12, SEEK_CUR); /* skip 12 bytes */


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson