Siebel eScript Language Reference > Siebel eScript Commands > File I/O Methods in eScript >

Clib.rewind() Method


This method sets the file cursor to the beginning of a file.

Syntax

Clib.rewind(filePointer)

Parameter
Description

filePointer

A file pointer as returned by Clib.fopen()

Usage

This call is identical to Clib.fseek(filePointer, 0, SEEK_SET) except that it also clears the error indicator for the file indicated by filePointer.

NOTE:  Siebel applications use UTF-16 encoding when writing to a file in Unicode. The first two bytes of the file are always the BOM (Byte Order Mark). When Clib.rewind is called on such a file, it is pointing to the BOM (-257) and not the first valid character. The user can call Clib.fgetc/getc once to skip the BOM.

Example

For an example, read Clib.fgets() Method.

See Also

Clib.fseek() Method

Siebel eScript Language Reference