_server.readFile()

Availability:

SmartFoxServer PRO 1.2.1

Usage:

_server.readFile(fileName)

Description:

Reads a text file from disk.
You should provide the file path relative to the folder where the server is located. Default is the Server/ folder

Properties:

fileName   the file name to read

Returns:

A String containing the text read from the file.

Example:

/*
* Reads a file located in the folder one level up from where the extension is located
*/

var textFile = _server.readFile("../myTestFile.txt")

See also: