The function creates/opens the specified file for writing.
Declaration
INT %FIO_Create(
TEXT in fileName
[,BOOL in utf8 = @FALSE | ,TEXT in encoding = "@APP_DEFAULT@"]
)
Parameters
fileName
Name of the file to be created. If the file already exists, it is opened and its contents are deleted.
utf8
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 UTF-8 is being read a possible BOM is omitted (characters 0xEF, 0xBB, 0xBF.
Zero - cannot create/open the file, nonzero - the file created/opened.
Value of the parameter is used later when calling other %FIO_* functions, which need it. 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 the execution of ESL script is terminated early, the D2000 EventHandler process will automatically close all opened files.
Pridať komentár