walk-fs
v0.0.2
Published
Walk the file system
Downloads
2,759
Readme
Walk a directory
API
walk(dir, [options], iterator, callback);
Parameters:
dir
: absolute directoryoptions
: optional, properties:{ recursive: [boolean] }
iterator
: function(path, stats), where stats is an instance of fs.Statscallback
: function(err)
Return false from the iterator to stop walking.
Example
var walk = require('walk-fs');
walk(path.join(__dirname), function(path, stats) {
console.log(path, stats);
}, function(err) {
assert(!err);
});
Install
npm install walk-fs