{%= name %} {%= badge("fury") %}

Also see

  • del if you need globbing. This lib was inspired by del, I wanted a quick solution that prevented accidental deletion of files outside the current working directory, but for individual files and without the extra dependencies.

  • write for writing files to disk.

Install

Usage

var del = require('delete');

// delete files asynchronously
del('tmp/foo.md', function(err) {
  if (err) {throw err;}
});

// delete files synchronously
del.sync('tmp/foo.md');

options.force

An error is thrown if you try to delete files outside of the current working directory (cwd).

Override the default behavior:

del.sync('../foo.md', {force: true});

Author

License

Last updated