walk-fs

0.0.2 • Public • Published

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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i walk-fs

    Weekly Downloads

    439

    Version

    0.0.2

    License

    none

    Last publish

    Collaborators

    • skoni