An open API service indexing awesome lists of open source software.

https://github.com/jonschlinkert/dirs

Fast, basic lib for recursively reading directories.
https://github.com/jonschlinkert/dirs

directories dirname fs javascript jonschlinkert nodejs path paths

Last synced: 7 months ago
JSON representation

Fast, basic lib for recursively reading directories.

Awesome Lists containing this project

README

          

# dirs [![NPM version](https://badge.fury.io/js/dirs.svg)](http://badge.fury.io/js/dirs) [![Build Status](https://travis-ci.org/jonschlinkert/dirs.svg)](https://travis-ci.org/jonschlinkert/dirs)

> List directories or files, async or sync.

## Install with [npm](npmjs.org)

```bash
npm i dirs --save
```

## Usage

```js
var list = require('dirs');
```

Pass the starting directory:

```js
// async
list('.', function (err, files) {
if (err) console.log(err);
//=> ['.gitattributes', '.gitignore', '.jshintrc', ...]
});

// sync
list('.');
//=> ['.gitattributes', '.gitignore', '.jshintrc', ...]
```

## Running tests
Install dev dependencies.

```bash
npm i -d && npm test
```

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/dirs/issues)

## Author

**Jon Schlinkert**

+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)

## License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 22, 2015._