Updated readme, version, code style
This commit is contained in:
parent
43ffe0e979
commit
5a6372fe46
3 changed files with 8 additions and 6 deletions
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
var fs = require("fs");
|
||||
|
||||
/* wrench.rmdirSyncRecursive("directory_path", failSilent);
|
||||
/* wrench.rmdirSyncRecursive("directory_path", forceDelete, failSilent);
|
||||
*
|
||||
* Recursively dives through directories and obliterates everything about it. This is a
|
||||
* Sync-function, which blocks things until it's done. No idea why anybody would want an
|
||||
|
|
@ -21,9 +21,11 @@ var fs = require("fs");
|
|||
*/
|
||||
exports.rmdirSyncRecursive = function(path, failSilent) {
|
||||
var files;
|
||||
try { files = fs.readdirSync(path); }
|
||||
catch (err) {
|
||||
if (failSilent) return;
|
||||
|
||||
try {
|
||||
files = fs.readdirSync(path);
|
||||
} catch (err) {
|
||||
if(failSilent) return;
|
||||
throw new Error(err.message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue