Click or drag to resize

Readfile function

Readfile function returns the whole text of a file.

Syntax

Default syntax: [var] = readfile "{fileName}". Returns "fileError" if it cannot read the file.

//Reads the "data.txt" file
[data] = readfile "{startupPath}\data.txt"

if not(streq "{data}" "fileError") then
  //Do some stuff
else
  output Error reading file!
endif