Siebel eScript Language Reference > C Language Library Reference > Clib File Input and Output Methods >

Clib Move Cursor to Beginning of File Method


The Clib Move Cursor to Beginning of File method moves the file cursor to the beginning of a file. This method is identical to the Clib Set Cursor Position method with the mode argument set to SEEK_SET and the offset argument set to 0. The only difference is that the Clib Move Cursor to Beginning of File method also clears the error indicator for the file.

Format

Clib.rewind(filePointer)

The arguments for this method are the same as the arguments for the Clib Clear Error method. For more information, see Arguments for the Clib Clear Error Method.

Usage With a Unicode File

Siebel CRM uses UTF-16 encoding when it writes to a file in Unicode. The first two bytes of the file are always the BOM (Byte Order Mark). If the Clib Move Cursor to Beginning of File method calls a Unicode file, then it references BOM (-257) and not the first valid character. To skip the BOM, you must configure Siebel CRM to call the Clib Get Character Method or the Clib File Get Character Method method at least one time. For more information, see Clib Get Character Method.

Example

For an example, see Clib Get Characters to Next Line Method.

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.