Site Tools


fseek

Table of Contents

# $EPIC: fseek.txt,v 1.2 2006/10/06 19:08:28 jnelson Exp $

Synopsis:

$fseek(file descriptor position anchor)

Technical:

This function resets the file pointer to position bytes away from anchor. The next read or readb of the file after this call will read the data from the new location.

Position can be positive or negative, and Anchor must be one of

SET The beginning of the file
CUR The current place in the file
END The end of the file

This function returns the fseek(3) value, which is zero if the operation succeeds and is non-zero if an error occurs.

The file descriptor must have been a value previously returned by the open function.

Returns:

-1   Error: //file descriptor// was not previously returned by [[open]], or //anchor// is not supported.
 0   The file pointer was reset.
 1   The file pointer could not be reset.
fseek.txt · Last modified: 2006/10/06 19:08 by 127.0.0.1