Returns a string containing the contents of the file in the site's file system.

Syntax

Smartsite SXML CopyCode image Copy Code
string filesystem.readtext(string path)
string filesystem.readtext(string path, enum encoding)

Parameters

Name Data Type Description
path String Name of the file.
encoding Enum Character encoding used in the file
Enum values:
  • Ascii
    Ascii encoding
  • Utf7
    Utf-7 encoding
  • Utf8
    Utf-8 encoding
  • Utf16
    Utf-16 encoding
  • Utf32
    Utf-32 encoding

Return Value

Data Type Description
String A string containing the file contents.

Expand image Example

SXML