Skip to content

Predefined functions

loadFile

The loadFile function reads a text file and return file's contents as a string, for example:

var myList = loadFile("mylist.txt")

Syntax is:

loadFile(filePath)

where file filePath is the path of the text file relative to the rules sub-folder of the project folder.

Tip

When used to load relatively big files (e.g. large lists), it is recommended to call loadFile inside the initialize function that gets executed just once at engine start.