Permalink
Browse files

readme and an example

  • Loading branch information...
1 parent 284bc24 commit 009faa850b5ede9e4f77ef291dbb86c85b466917 @substack substack committed Jan 6, 2011
Showing with 27 additions and 0 deletions.
  1. +21 −0 README.markdown
  2. +6 −0 examples/pow.js
View
@@ -0,0 +1,21 @@
+mkdirp
+======
+
+Like `mkdir -p`, but in node.js!
+
+Example
+=======
+
+pow.js
+------
+ var mkdirp = require('mkdirp').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!
View
@@ -0,0 +1,6 @@
+var mkdirp = require('mkdirp').mkdirp;
+
+mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});

0 comments on commit 009faa8

Please sign in to comment.