Asynchronously reads a file and returns a Promise of its contents.

Example

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

FileSystem.readTextFromFile("myfile.txt")
    .then(function(contents) {
        console.log(contents);
    }, function(error) {
        console.log(error);
    });

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 2.9.1

Returns

Promise

A Promise of the file's contents as a String.