Filesystem.exists()

Check whether a file or directory exists at the given path.

Usage

Hover over inputs/exits for more info.

var Filesystem = require('machinepack-fs');


// Check whether a file or directory exists at the given path.

Filesystem.exists({

path: '/Users/mikermcneil/.tmp/foo',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

path required

The path to the file or directory to check.

'/Users/mikermcneil/.tmp/foo'

Exits

error

An unexpected error occurred.

success

OK.

true