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 2.9.1

Returns

Promise

Array of filenames in the directory