Skip to content

jarofghosts/dirstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dir-stream

Build Status npm install npm version js-standard-style License

given a stream of directory names, will output a stream of all contents of that directory recursively and queued in order of receipt.

example

var dirstream = require('dir-stream')

dirstream.on('data', function (filename) {
  // `filename` is a file or dir within `__dirname`
})

dirstream.write(__dirname)

options

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
}

license

MIT