Simple rimraf with promise support 🎉
npm install @alexbinary/rimrafSimple rimraf with promise support 🎉





Uses @alexbinary/promisify by alexbinary
Install using npm or yarn :
``bash`
$ npm install @alexbinary/rimrafor
$ yarn add @alexbinary/rimraf
`javascript
let rimraf = require('@alexbinary/rimraf')
// promise
rimraf('/foo/bar').then(() => {
console.log('file deleted')
})
// callback
rimraf('/foo/bar', (err) => {
if (!err) {
console.log('file deleted')
}
})
// sync
rimraf.sync('/foo/bar')
console.log('file deleted')
`
`javascript`
let rimraf = require('@alexbinary/rimraf')
Removes the file or directory at filepath.filepath` is a directory then the directory is removed with all its content.
If
This method supports both Promise and node callback style, and resolves with no arguments.
Synchronous version.
MIT