tightwalk
v0.9.0
Published
A simple directory walker that doesn't bail on errors.
Downloads
3
Readme
tightwalk
A simple directory walker for Node that does not stop on errors. (I designed this to work well with kicktock.)
Installation
npm install tightwalk
Example
var tightwalk = require('tightwalk');
tightwalk(__dirname, function(err, path, stats) {
if (err)
console.log(err);
console.log(path, stats);
}, function() {
console.log("DONE!");
});
API
tightwalk(dir, walkCb, finishCb)
Parameters
dir
: The directory to walkwalkCb
:function(err, file, stats)
The function to be called with each file.err
: Any error occuring with accessing this file.file
: Relative file path.stats
: fs.Stats object
finishCb
:function()
Called when all files have been walked.