https://github.com/roppa/read-directory
Read a directory or recursively read a directory to get a list of files
https://github.com/roppa/read-directory
Last synced: about 1 year ago
JSON representation
Read a directory or recursively read a directory to get a list of files
- Host: GitHub
- URL: https://github.com/roppa/read-directory
- Owner: roppa
- Created: 2016-12-21T16:32:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-29T23:36:40.000Z (almost 9 years ago)
- Last Synced: 2025-02-14T18:36:28.072Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/roppa/read-directory)[](https://coveralls.io/github/roppa/read-directory?branch=master)
# read-directory
Read a folder recursively and get a list of all files.
## readDirectory('path/to/folder'[,ignoreObject])
Where ignoreObject is something like:
```javascript
{
pdf: null,
doc: null,
docx: null
}
```
Returns a promise which resolves an array of file paths.
## readDeepDirectory('path/to/folder'[,ignoreObject,readCallback])
Returns a promise which resolves an array of file paths.
If a callback is supplied, the stat object is returned along with a 'file' attribute with the full file path.
## Test
```javascript
npm run test
```