askovpen/node-fidonet-outbound-lbox — pull request #4 by Mithgol (2014-06-30 05:28:49+00:00)
Title: make the `read` method totally asynchronous

Using [`async.eachLimit`](https://github.com/caolan/async/#eachlimitarr-limit-iterator-callback), the `read` method is made totally asynchronous: all synchronous methods (`fs.statSync`, `fs.readdirSync`) are replaced by their asynchronous counterparts.

I used `async.eachLimit` (instead of `async.each`) intentionally because I am afraid that some filesystems (such as USB flash drives for example) won't handle multiple concurrent stat/readdir queries good.

This pull request also fixes #3 (because this branch of my fork is based on that branch).