npm.io
0.0.2 • Published 13 years ago

walk-fs

Licence
—
Version
0.0.2
Deps
0
Vulns
0
Weekly
0
Stars
2

Walk a directory

API

walk(dir, [options], iterator, callback);

Parameters:

  • dir: absolute directory
  • options: optional, properties: { recursive: [default is true] }
  • iterator: function(path, stats), where stats is an instance of fs.Stats
  • callback: function(err)

Return false from the iterator to stop walking.

Example
var walk = require('walk-fs');

walk(__dirname, function(path, stats) {
  console.log(path, stats);

}, function(err) {
  assert(!err);
});
Install

npm install walk-fs

Keywords