]> git.r.bdr.sh - rbdr/dotfiles/blob
cd123b65248e91a65e2b00a5a3e5b9f4566c492a
[rbdr/dotfiles] /
1 `rm -rf` for node.
2
3 Install with `npm install rimraf`, or just drop rimraf.js somewhere.
4
5 ## API
6
7 `rimraf(f, callback)`
8
9 The callback will be called with an error if there is one. Certain
10 errors are handled for you:
11
12 * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
13 `opts.maxBusyTries` times before giving up.
14 * `ENOENT` - If the file doesn't exist, rimraf will return
15 successfully, since your desired outcome is already the case.
16
17 ## rimraf.sync
18
19 It can remove stuff synchronously, too. But that's not so good. Use
20 the async API. It's better.
21
22 ## CLI
23
24 If installed with `npm install rimraf -g` it can be used as a global
25 command `rimraf <path>` which is useful for cross platform support.
26
27 ## mkdirp
28
29 If you need to create a directory recursively, check out
30 [mkdirp](https://github.com/substack/node-mkdirp).