fs-force-delete-sync
v1.0.0
Published
Just provide a path to delete everything inside
Downloads
8
Maintainers
Readme
fs-force-delete-sync
Requirements
- Node >= 6.0.0
Usage
var rmSync = require('fs-force-delete-sync');
try {
let info = rmSync('foo');
console.log('Succeed', info);
} catch (error) {
console.log('Failed', error);
}
The code above would check for 'foo'
existence,
- If
'foo'
doesn't exist,rmSync
does nothing - If
'foo'
is a file,rmSync
would deletes that file - If
'foo'
is a directory,rmSync
would recurs itself with children of'foo'
and then deletes'foo'