contents   index   previous   next



Clib.fseek()

syntax:

Clib.fseek(filePointer, offset[, mode])

where:

filePointer - pointer to file to use.

 

offset - number of bytes past or offset from the point indicated by mode.

 

mode - file position to use as a starting point. Default is SEEK_SET and may be one of the following:

 

SEEK_CUR
seek is relative to the current position of the file

SEEK_END
position is relative from the end of the file

SEEK_SET
position is relative to the beginning of the file

return:

number - 0 on success, else non-zero.

 

description:

Set the position of the file pointer of the open file stream filePointer. The parameter offset is a number indicating how many bytes the new position will be past the starting point indicated by mode.

 

If mode is not supplied then absolute offset from the beginning of file, SEEK_SET, is assumed. For text files, not opened in binary mode, the file position may not correspond exactly to the byte offset in the file.

 

see:

Clib.fsetpos(), Clib.ftell()

 

 


Clib.fsetpos()