Remove all files in the given path recursively
JavaScript
Pull request Compare This branch is 12 commits ahead, 24 commits behind dreamerslab:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
.npmignore
License
Makefile
Readme.md
index.js
package.json
sync.js

Readme.md

rmdir

Remove all files in the given path recursively. This is equivilent to the unix command rm -r.

Installation

npm install rm-r

then in your app

var rm = require('rm-r')

API

This package contains two implementations sync and async. Both have the same API and test suite but the async version returns results.

remove(path)

rm whatever happens to be at path

rmfile(path)

rm file or symlink

rmdir(path)

empty dir and remove it

Example

rm('/path/to/the/thing/you/want/gone')
rm.file('/path/to/a/file')
rm.dir('/path/to/a/dir')