Sunday, 25 August 2013

Node.js 'Not Found' callback for async.detect?

Node.js 'Not Found' callback for async.detect?

I have a file path list file_paths, and I want to detect which file
exists. If any file exists, I want to read that one. Otherwise call
another function, not_found for example.
I wish to use async.detect but I found no way to add a 'Not Found'
callback when all the iterators return false.
If there's another way to do it, please add it to the answer.

No comments:

Post a Comment