For rmdirSyncRecurisve I believe:
var currFile = fs.statSync(path + "/" + files[i]);
should be
var currFile = fs.lstatSync(path + "/" + files[i]);
so any symbolic links will be evaluated as the link instead of the file it resolves to.
Currently a symbolic linked folder being deleted will receive an ENOTDIR, not a directory.
For rmdirSyncRecurisve I believe: var currFile = fs.statSync(path + "/" + files[i]); should be var currFile = fs.lstatSync(path + "/" + files[i]);
so any symbolic links will be evaluated as the link instead of the file it resolves to. Currently a symbolic linked folder being deleted will receive an ENOTDIR, not a directory.