Skip to content

Commit

Permalink
Added recursive mkdirSync() example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Pedro committed Dec 19, 2010
1 parent 807898c commit befe64c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Require our fs lib, not the original.
//
var fs = require('./lib/fs.js');
var fs = require('./lib/fs');

//
// Example with non-recursion.
Expand All @@ -24,4 +24,8 @@ fs.mkdir('example_dir/first/second/third/fourth/fifth', 0777, true, function (er
} else {
console.log('Directory created');
}
});
});

//
// Synchronous example with recursion.
fs.mkdirSync('example_sync/first/second/third/fourth/fifth', 0777, true);

0 comments on commit befe64c

Please sign in to comment.