FileSystemModule.getFileInfo(path) Method (JS)
Asynchronously gets info about a file.
The returned object has the following properties:
size
– size of fileexists
– a boolean value stating whether file existslastWriteTime
– ADate
stating when file was last changedlastAccessTime
– ADate
stating when file was accessed
Example
var FileSystem = require("FuseJS/FileSystem");
FileSystem.writeTextToFileSync("some-file.txt", "hello there");
FileSystem.getFileInfo("some-file.txt")
.then(function(fileInfo) {
console.log("file was modified on " + fileInfo.lastWriteTime);
})
.catch(function(error) {
"failed stat " + error
});
Location
- Namespace
- Fuse.FileSystem
- Package
- Fuse.FileSystem 2.9.1
Returns
Promise
A Promise of an object containing info about the file.