Bones/node_modules/mkdirp/examples/pow.js.rej
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

19 lines
420 B
Plaintext

--- examples/pow.js
+++ examples/pow.js
@@ -1,6 +1,15 @@
-var mkdirp = require('mkdirp').mkdirp;
+var mkdirp = require('../').mkdirp,
+ mkdirpSync = require('../').mkdirpSync;
mkdirp('/tmp/foo/bar/baz', 0755, function (err) {
if (err) console.error(err)
else console.log('pow!')
});
+
+try {
+ mkdirpSync('/tmp/bar/foo/baz', 0755);
+ console.log('double pow!');
+}
+catch (ex) {
+ console.log(ex);
+}