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

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

var files = glob.readdirSync('*.js');
//=> do stuff with `files`
```

@name .readdirSync
@param  {String} `pattern` Glob pattern
@param  {Object} `options`
@returns {Array} Returns an array of files.
@api public
Synchronously glob files or directories that match the given pattern .