https://github.com/queckezz/co-walk
walk a file tree and return a list of files
https://github.com/queckezz/co-walk
Last synced: 4 months ago
JSON representation
walk a file tree and return a list of files
- Host: GitHub
- URL: https://github.com/queckezz/co-walk
- Owner: queckezz
- Created: 2014-03-15T11:40:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-18T19:22:46.000Z (about 10 years ago)
- Last Synced: 2024-11-14T10:29:29.092Z (11 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: history.md
Awesome Lists containing this project
README
# co-walk
walk a file tree and return a list of files
## Installation
```
$ npm install co-walk
```## Example
```js
var path = __dirname + '/app'var files = yield walk(path, {
symlinks: true,
ignore: ['art/**', 'node_modules']
})// -> ['/home/user/app/.gitignore', ...]
```## API
### *walk(path, opts)
walk a file tree and return a list of files
* `path`: full path to folder
* `opts`:
* `symlinks`: follow symlinks and return origin path _[false]_
* `ignore`: a list which folders and files you want to ignore, or a predicate function `(filename, relPath, fullPath) => boolean`## Tests
```
$ make test
```## Licence
MIT