Skip to content

Commit

Permalink
docs: Refactor remove exmaple to use remove instead of removeSync
Browse files Browse the repository at this point in the history
  • Loading branch information
manidlou committed Mar 9, 2017
1 parent 936011e commit 83a6190
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/remove.md
Expand Up @@ -10,11 +10,16 @@ Removes a file or directory. The directory can have contents. Like `rm -rf`.
```js
const fs = require('fs-extra')

// remove file
fs.remove('/tmp/myfile', err => {
if (err) return console.error(err)

console.log('success!')
})

fs.removeSync('/home/jprichardson') // I just deleted my entire HOME directory.
fs.remove('/home/jprichardson', err => {
if (err) return console.error(err)

console.log('success!') // I just deleted my entire HOME directory.
})
```

0 comments on commit 83a6190

Please sign in to comment.