FileSystemModule.getDirectoryInfo(path) Method (JS)
Asynchronously gets info about a directory.
The returned object has the following properties:
exists
– a boolean value stating whether the directory exists or not.lastWriteTime
– ADate
stating when directory was last changedlastAccessTime
– ADate
stating when directory was accessed
Example
var FileSystem = require("FuseJS/FileSystem");
FileSystem.createDirectorySync("some-dir");
FileSystem.getDirectoryInfo("some-dir")
.then(function(dirInfo) {
console.log("Directory was modified on " + dirInfo.lastWriteTime);
})
.catch(function(error) {
console.log("Failed to get directory info " + error);
});
Location
- Namespace
- Fuse.FileSystem
- Package
- Fuse.FileSystem 2.9.1
Returns
Promise
A Promise of an object containing info about the directory.