Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > File I/O Methods in eScript > Clib.freopen() MethodThis method closes the file associated with a file pointer and then opens a file and associates it with the file pointer of the file that has been closed. SyntaxClib.freopen(filename, mode, oldFilePointer) ReturnsA copy of the old file pointer after reassignment, or UsageThis method closes the file associated with oldFilePointer (ignoring any close errors) and then opens filename according to mode (as in Clib.fopen()) and reassociates oldFilePointer to this new file specification. It is commonly used to redirect one of the predefined file handles (stdout, stderr, stdin) to or from a file. ExampleThe following sample script writes to two different files using the same filepointer. var oFile = Clib.fopen("c:\\temp\\firstfile","w"); See Also |
Siebel eScript Language Reference |