0.0.2 • Published 11 years ago
directory-structure v0.0.2
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