mkdir -p, but in fibjs!
$ npm i @fibjs/mkdirp --save
const mkdirp = ;trycatcherrconsole
then /tmp/a/c/d has beed created.
- mkdirp(dir, opts)
asynchronously create a new directory and any necessary subdirectories at
with octal permission string
opts is a non-object, it will be
treated as the
opts.mode isn't specified, it defaults to
0777 & (~process.umask()).
Returns the first directory that had to be created, if any.
You can optionally pass in an alternate
fs implementation by passing in
opts.fs. Your implementation should have
opts.fs.mkdir(path, mode) and
Questions & Suggestions
Please open an issue here.