Asynchronously check if a file exists.

Example

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

FileSystem.exists("myfile.txt")
    .then(function(x) {
        console.log(x ? "it's there! =)" : "it's missing :/");
    }, function(error) {
        console.log("Unable to check if file exists");
    });

Location

Namespace
Fuse.FileSystem
Package
Fuse.FileSystem 2.9.1

Returns

Promise

A Promise that resolves to true if the file exists, false if not, and rejects if the file's existence could not be determined.