shrub
v0.2.0
Published
Manipulate lists of files recursively in Node. Chainable API with a promise ending.
Downloads
61
Readme
Shrub
Manipulate lists of files recursively in Node.
Install
npm install shrub --save
Usage
var Shrub = require('shrub');
var shrub = new Shrub('path/to/dir');
shrub.each(function (filePath, stats, next) {
// Do stuff
next();
}, function () {
// complete
});
shrub.filter(function (filePath, stats, next) {
// Callback a true statement to add this file
// to the filtered list
next(filePath === 'some/file/path');
}, function (files) {
// complete
});
Methods
each(filterFn, onComplete)
Asynchronous loop through file tree
filter(filterFn, onComplete)
Aynchronously filter the file tree