Skip to content
This repository

Recursively mkdir, like `mkdir -p`, but in node.js

tag: 0.2.1

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 test
Octocat-spinner-32 LICENSE mit/x11 January 06, 2011
Octocat-spinner-32 README.markdown
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.markdown

mkdirp

Like mkdir -p, but in node.js!

example

pow.js

var mkdirp = require('mkdirp');

mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
    if (err) console.error(err)
    else console.log('pow!')
});

Output pow!

And now /tmp/foo/bar/baz exists, huzzah!

methods

var mkdirp = require('mkdirp');

mkdirp(dir, mode, cb)

Create a new directory and any necessary subdirectories at dir with octal permission string mode.

mkdirp.sync(dir, mode)

Synchronously create a new directory and any necessary subdirectories at dir with octal permission string mode.

install

With npm do:

npm install mkdirp

license

MIT/X11

Something went wrong with that request. Please try again.