Porovnávané verzie

Kľúč

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

...

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


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


Parameters


fileNameThe File name (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 function returns the contents of the specified file.

If the size of the file is more than 1 5 MB or the files do not exist, the function returns an invalid value.
NoteThe function uses binary mode to read the file.
Example


Blok kódu
languageesl
themeRDark
 BEGIN
   TEXT _data
   _data := %FIO_ReadWholeFile("c:\datafile")
 END 


...