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.
- Host: GitHub
- URL: https://github.com/jonschlinkert/dirs
- Owner: jonschlinkert
- License: mit
- Created: 2014-09-05T22:04:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-22T08:22:47.000Z (over 10 years ago)
- Last Synced: 2025-02-26T18:56:53.938Z (8 months ago)
- Topics: directories, dirname, fs, javascript, jonschlinkert, nodejs, path, paths
- Language: JavaScript
- Size: 137 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dirs [](http://badge.fury.io/js/dirs) [](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._