mkdirp-promise
Promise version of mkdirp:
Match files using the patterns the shell uses, like stars and stuff.
Install
npm install --save mkdirp-promise
API
var mkdirp = require('mkdirp-promise')
mkdirp(dir, [, options])
pattern: String
options: Object
or String
Return: Object
(Promise)
When it finishes, it will be fulfilled with the first directory made that had to be created, if any.
When it fails, it will be rejected with an error as its first argument.
mkdirp('/tmp/foo/bar/baz')
.then(function (made) {
console.log(made)
})
.catch(function (err) {
console.error(err)
})
})
options
The option object will be directly passed to mkdirp.
License
ISC License © Ahmad Nassri