NaturalPath.resolve()

Resolve list of directory names to file system path

Resolve list of directory names to file system path

Usage

Hover over inputs/exits for more info.

var NaturalPath = require('machinepack-naturalpath');


// Resolve list of directory names to file system path

NaturalPath.resolve({

names: [ 'Google Drive', 'School', '2015 2016', 'Cryptography' ],

cwd: '/Users/Glavin',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Not found

notFound: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

names required

List of directory names

[ 'Google Drive', 'School', '2015 2016', 'Cryptography' ]
cwd

Current working directory to resolve the directory names

'/Users/Glavin'

Exits

error

An unexpected error occurred.

notFound

Not found

success

OK.

'/Users/glavin/Google Drive/School/2015-2016/CSCI 4423 - Cryptography/'