given a stream of directory names, will output a stream of all contents of that directory recursively and queued in order of receipt.
var dirstream = require('dir-stream')
dirstream.on('data', function (filename) {
// `filename` is a file or dir within `__dirname`
})
dirstream.write(__dirname)
optionally, you can pass a configuration object to the function with options:
{
ignoreExtensions: ['exe'], // don't stream filenames with extensions listed
onlyFiles: false, // don't stream dirs
noRecurse: false // don't recurse into dirs
}
MIT