Synchronously reads a file and returns its contents as a string.

Example

var FileSystem = require("FuseJS/FileSystem");

var content =  FileSystem.readTextFromFileSync(FileSystem.dataDirectory + "/" + "myfile.txt");
console.log("The file contains " + content));

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 1.9.0

Returns

String

The contents of the file as a String.