klaw-sync
=========
[](https://www.npmjs.com/package/klaw-sync)
[](https://travis-ci.org/manidlou/node-klaw-sync)
[](https://ci.appveyor.com/project/manidlou/node-klaw-sync/branch/master)
`klaw-sync` is a Node.js recursive file system walker, which is the synchronous counterpart of [klaw](https://github.com/jprichardson/node-klaw). It lists all files and directories inside a directory recursively and returns an array of objects that each object has two properties: `path` and `stats`. `path` is the full path of the file or directory and `stats` is an instance of [fs.Stats](https://nodejs.org/api/fs.html#fs_class_fs_stats).
Install
-------
npm i klaw-sync
Usage
-----
### klawSync(directory[, options])
- `directory` `{String}`
- `options` `{Object}` *optional* (all options are `false` by default)
- `ignore` `{String | Array}` any paths or [micromatch](https://github.com/jonschlinkert/micromatch#features) patterns to ignore (can be string or an array of strings)
- `nodir` `{Boolean}` return only files (ignore directories)
- `nofile` `{Boolean}` return only directories (ignore files)
- return: `{Array