Asynchronously reads a file and returns a Promise of an ArrayBuffer with its contents.

Example

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

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

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 2.7.0

Returns

Promise

A Promise of the file's contents as an ArrayBuffer.