1.1.0 • Published 8 years ago
fs-readdir-recursive v1.1.0
fs.readdirSyncRecursive
Read a directory recursively.
Install
npm install fs-readdir-recursiveExample
var read = require('fs-readdir-recursive')
read(__dirname) === [
'test/test.js',
'index.js',
'LICENSE',
'package.json',
'README.md'
]API
read(root , filter)
root is the directory you wish to scan. filter is an optional filter for the files with three params(name, index, dir). By default, filter is:
function (name) {
return name[0] !== '.'
}Which basically just ignores . files.