0.9.0 • Published 6 years ago

tightwalk v0.9.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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 walk
  • walkCb: 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.