directory-structure
v0.0.2
Published
Create an empty directory structure
Downloads
4
Readme
Create arbitrary directory structures.
Install
npm install directory-structure
Usage
var mkdirs = require('directory-structure')
mkdirs(root, subdirs, cb)
root
must existsubdirs
is an array of subdirectories to create belowroot
cb
is the callbackfunction (err) {}
(err
is null if ok)
Eg:
mkdirs('/Users/bengourley', ['foo', 'bar', 'baz'], function (err) {
if (err) throw err
console.log('done!')
})
Results in:
/Users/bengourley
└─┬ foo
├ bar
└ baz