Asynchronously list files in directory.

Example

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

FileSystem.listFiles(FileSystem.dataDirectory)
    .then(function(files) {
        console.log("There are " + files.length + " files in directory")
    }, function(error) {
        console.log("Unable to list files in directory due to error " + error);
    });

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 1.11.2

Returns

Promise

Array of filenames in the directory