UNPKG

961 BMarkdownView Raw
1# {%= name %} {%= badge("fury") %}
2
3> {%= description %}
4
5Also see
6* [del](https://github.com/sindresorhus/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.
7* [write](https://github.com/jonschlinkert/write) for writing files to disk.
8
9## Install
10{%= include("install") %}
11
12## Usage
13
14```js
15var del = require('delete');
16
17// delete files asynchronously
18del('tmp/foo.md', function(err) {
19 if (err) {throw err;}
20});
21
22// delete files synchronously
23del.sync('tmp/foo.md');
24```
25
26### options.force
27
28An error is thrown if you try to delete files outside of the current working directory (cwd).
29
30Override the default behavior:
31
32```js
33del.sync('../foo.md', {force: true});
34```
35
36## Author
37{%= include("author") %}
38
39## License
40{%= copyright() %}
41{%= license() %}
42
43***
44
45{%= include("footer") %}
\No newline at end of file