1.2.0 • Published 8 years ago

fswalk v1.2.0

Weekly downloads
45
License
MIT
Repository
github
Last release
8 years ago

fswalk

Build Status npm version

The simplest possible directory walker

API

walk(dir, walkCb, finishCb, limit)

Parameters

  • dir: absolute dir to walk
  • walkCb: function(file, stats[, callback]) The function to be called with each file. If a callback is given any errors will be propagated to finishCb and the walk will stop soon. walkCb is called in parallel for some files, so the walk will stop at the current folder. finishCb will not be called until all walkCb callbacks have been called.
  • finishCb: function(err) Called when there are no more files
  • limit: max depth, undefined means no limit

Example

var walk = require('fswalk');

walk(__dirname, function(path, stats) {
  console.log(path, stats);
}, function(err) {
  assert(!err);
});

Install

npm install fswalk

1.2.0

8 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

10 years ago