Asynchronously writes a string to a UTF-8 encoded file.

Example

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

FileSystem.writeTextToFile(FileSystem.dataDirectory + "/" + "myfile.txt", "Hello buddy")
    .then(function() {
        console.log("Successful write");
    }, function(error) {
        console.log(error);
    });

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 1.9.0

Returns

Promise

A Promise of nothing.