Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%FIO_WriteWholeFile function

...

FunctionThe function reads a specified file and inserts its contents into a variable of the Text type.
Declaration


Blok kódu
languageesl
themeConfluence
 BOOL %FIO_WriteWholeFile(
  TEXT in dataText
 TEXT in fileName
 [,TEXT in encoding = "@APP_DEFAULT@"]  ) 


Parameters


dataText
Parameter
The parameter that contains the data is to be written into the file.
fileNameFile name (optionally full path).
encodingOptional parameter of Text typ - type of file encoding. If it is not defined, its default value is "@APP_DEFAULT@". For reading of binary file, you must use "Binary" encoding.
The list of supported encodings in ESL.


Return valueThe return value is True
,
if the action was successful. Otherwise, it is False.

If the size of the file is bigger than the space available on the disc, the function returns an invalid value.
NoteThe function uses binary mode to write into the file.
Example


Blok kódu
languageesl
themeRDark
 BEGIN
   BOOL _out
   _out := %FIO_WriteWholeFile("Zapisovany text","c:\Info.txt")
 END 


...

Info
titleRelated pages:

ESL extended functions
Function arguments - types

...