promise-walker

Promise-based error-tolerant directory walker


Keywords
filewalker, fs, promise
License
MIT
Install
npm install promise-walker@0.1.0

Documentation

promise-walker

Codeship CI status license:mit

Reads directory and tolerating possible EBUSY, EPERM, EACCES errors

Install

npm i promise-walker --save

Example

const walk = require('promise-walker');

walk('./path').then(function(items) {
  // items -> [
  //   ...
  //   {
  //     path: './path/foo'
  //     stat: fs.Stat | null,
  //     error: null | Error('EBUSY') | Error('EPERM') | Error('EACCES')
  //   }
  //   ...
  // ];
});

API

walk(path, [options]); // -> Promise

options:

  • concurrency: Number: Default: 16. Limits concurrently inspected files;

License

MIT © Yury Solovyov