FileSystemModule.readTextFromFileSync(filename) Method (JS)
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 2.9.1
Returns
String
The contents of the file as a String.