forked from svrjs/svrjs
Lint out the codebase.
This commit is contained in:
parent
8be7735e71
commit
eb0d30f307
1 changed files with 5 additions and 3 deletions
|
@ -4,9 +4,11 @@ function deleteFolderRecursive(path) {
|
|||
if (fs.existsSync(path)) {
|
||||
fs.readdirSync(path).forEach(function (file) {
|
||||
const curPath = path + "/" + file;
|
||||
if (fs.statSync(curPath).isDirectory()) { // recurse
|
||||
if (fs.statSync(curPath).isDirectory()) {
|
||||
// recurse
|
||||
deleteFolderRecursive(curPath);
|
||||
} else { // delete file
|
||||
} else {
|
||||
// delete file
|
||||
fs.unlinkSync(curPath);
|
||||
}
|
||||
});
|
||||
|
@ -14,4 +16,4 @@ function deleteFolderRecursive(path) {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = deleteFolderRecursive;
|
||||
module.exports = deleteFolderRecursive;
|
||||
|
|
Reference in a new issue