1.1.1 • Published 8 years ago

fs-force-delete v1.1.1

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

fs-force-delete

Requirements

  • Node >= 6.0.0

Usage

var rm = require('fs-force-delete');
rm('foo', (error, info) => {
    if (error) {
        console.error('Failed', error);
    } else {
        console.log('Succeed', info);
    }
})

The code above would check for 'foo' existence,

  • If 'foo' doesn't exist, rm does nothing
  • If 'foo' is a file, rm would deletes that file
  • If 'foo' is a directory, rm would recurs itself with children of 'foo' and then deletes 'foo'

License

MIT © Hoàng Văn Khải