lib/readers.js
function(pattern, options) {
      this.emit('read');
      this.setPattern(pattern, options);
      var res = this.iteratorStream(this.pattern.base);
      this.emit('end', this.files);
      return res;
    }
function(pattern, options) {
      this.emit('read');
      this.setPattern(pattern, options);
      var res = this.iteratorStream(this.pattern.base);
      this.emit('end', this.files);
      return res;
    }
function ( pattern , options ) { this . emit ( 'read' ) ; this . setPattern ( pattern , options ) ; var res = this . iteratorStream ( this . pattern . base ) ; this . emit ( 'end' , this . files ) ; return res ; }
Stream files or directories that match the given glob `pattern`.

```js
var glob = require('glob-fs')({ gitignore: true });

glob.readdirStream('*.js')
.on('data', function (file) {
console.log(file.path);
})
.on('error', console.error)
.on('end', function () {
console.log('end');
});
```

@name .readdirStream
@param  {String} `pattern` Glob pattern
@param  {Object} `options`
@returns {Stream}
@api public
Stream files or directories that match the given glob pattern .