0.1.0 • Published 7 years ago

rmr v0.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

rmr

Remove all files or directories from a path recursively

npm npm

Install

You can install the latest version of the package using npm:

$ npm install --save rmr

Usage

//Import package
var rmr = require('rmr');

//Remove a file
rmr('./your/path/file.txt', function(error){ console.log('file.txt removed'); });

//Remove a directory recursive
rmr('./your/path/folder/', function(error){ console.log('folder removed'); });

//Synchronous version
rmr.sync('./your/path/file.txt');

//Synchronous version
rmr.sync('./your/path/folder/');

API

rmr(path, callback)

Remove a file or directory recursively.

rmr.sync(path)

Synchronously remove a file or directory recursively.

License

MIT © Josemi Juanes.