Synchronously gets info about a file.

The returned object has the following properties:

  • exists – a boolean value stating whether file exists
  • lastWriteTime – A Date stating when file was last changed
  • lastAccessTime – A Date stating when file was accessed

Example

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

FileSystem.writeTextToFileSync("some-file.txt", "hello there");
var fileInfo = FileSystem.getFileInfoSync("some-file.txt");
console.log("file was modified on " + fileInfo.lastWriteTime);

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 2.9.1

Returns

Object

An object containing info about the file.