%FIO_OpenRead function


Function
The function opens the specified file for reading.
Declaration
INT %FIO_OpenRead(
   TEXT in fileName
  [,BOOL in utf8 = @FALSE | ,TEXT in encoding = "@APP_DEFAULT@"]
 )
Parameters
fileNameThe name of the file to open.
utf8An optional parameter of the Boolean type. If it is not written its alternate value is @FALSE.

If the value is @TRUE, the file is supposed to be text-based and its content is encoded in UTF-8. When file encoded by UTF8 is being read a possible BOM is omitted (characters 0xEF, 0xBB, 0xBF).

encodingAn optional parameter of the Text type. If it is not defined, its default value is "@APP_DEFAULT@".
The list of supported encodings in ESL.
Return value
Zero - cannot open the file, nonzero - file opened.

The value of the parameter is used later when calling other %FIO_* functions, which need it. The value is valid within the ESL script instance, the function was called from.

Note
Having finished the work with the file, it must be closed by calling the function %FIO_Close. If execution of ESL script is terminated early, the D2000 EventHandler  process will automatically close all open files.

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .