Asynchronous recursive file system operations
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test Refactored `rmdirr` module also `rmfiles` and `rmdirs` now are public. Feb 24, 2013
.gitignore
LICENSE
README.md
index.js
package.json

README.md

Install

$ npm install recursive-fs

Recursive

readdirr

var path = require('path');
var recursive = require('recursive-fs');

var root = path.resolve(process.argv[2]);
recursive.readdirr(root, function (err, dirs, files) {
    if (err) {
        console.log(err);
    } else {
        console.log('DONE!');
    }
});

rmdirr

var path = require('path');
var recursive = require('recursive-fs');

var root = path.resolve(process.argv[2]);
recursive.rmdirr(root, function (err) {
    if (err) {
        console.log(err);
    } else {
        console.log('DONE!');
    }
});

cpdirr

var path = require('path');
var recursive = require('recursive-fs');

var spath = path.resolve(process.argv[2]),
    tpath = path.resolve(process.argv[3]);
recursive.cpdirr(spath, tpath, function (err) {
    if (err) {
        console.log(err);
    } else {
        console.log('DONE!');
    }
});

Tests

$ mocha