Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 372 Bytes

remove.md

File metadata and controls

20 lines (12 loc) · 372 Bytes

remove(dir, callback)

Removes a file or directory. The directory can have contents. Like rm -rf.

Sync: removeSync()

Example:

var fs = require('fs-extra')

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

  console.log('success!')
})

fs.removeSync('/home/jprichardson') //I just deleted my entire HOME directory.