Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object >

Clib.fseek() Method


This method sets the position of the file cursor of an open file.

Syntax

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

Parameter
Description
filePointer
A file pointer as returned by Clib.fopen()
offset
The number of bytes to move the file cursor beyond mode
mode
One of the following values:
SEEK_CUR: seek is relative to the current position of the file cursor
SEEK_END: seek is relative to the end of the file
SEEK_SET: seek is relative to the beginning of the file

Returns

0 if successful, or nonzero if it cannot set the file cursor to the indicated position.

Usage

This method sets the position of the file cursor in the file indicated by filePointer. If mode is not supplied, then the absolute offset from the beginning of the file (SEEK_SET) is assumed. For text files (that is, files not opened in binary mode), the file position may not correspond exactly to the byte offset in the file.

See Also

Clib.fgetpos() Method, Clib.ftell() Method, and Clib.rewind() Method


 Siebel eScript Language Reference 
 Published: 18 April 2003