promise-walker

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i promise-walker

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • yurysolovyov