fileRead

Reads an on-disk or in-memory text file or a file object created with the FileOpen function.

fileRead(filePath [, charset]) → returns string

fileRead Argument Reference

filePath any
Required

An absolute file path, or file object.

charsetOrBufferSize any

Character encoding used to read the file or the number of characters to read

Examples sample code invoking the fileRead function

Uses expandPath to grab a file in current directory.

fileContent = fileRead(expandPath("./file.txt"), "utf-8")

Fork me on GitHub