Filesystem.mkdir()

Make a new directory.

Usage

Hover over inputs/exits for more info.

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


// Make a new directory.

Filesystem.mkdir({

destination: '/Users/mikermcneil/.tmp/bar',

force: false,

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Something already existed at the specified path (overwrite by enabling the `force` input).

alreadyExists: function () {

 

},

// OK.

success: function () {

 

},

});

Inputs

destination required

The destination path where the new directory should be created.

'/Users/mikermcneil/.tmp/bar'
force

Overwrite files or directories which might exist at or within the specified destination path?

false

Exits

error

An unexpected error occurred.

alreadyExists

Something already existed at the specified path (overwrite by enabling the `force` input).

success

OK.