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 – A Date stating when directory was last changed
  • lastAccessTime – A Date 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.