package
Recursively read a directory
npm install fs-readdir-recursiveGitHub-flavored package documentation.
Across all versions, last 30 days.
20,508,907 in 30 days
Runtime metadata.
Read a directory recursively.
npm install fs-readdir-recursivevar read = require('fs-readdir-recursive')
read(__dirname) === [
'test/test.js',
'index.js',
'LICENSE',
'package.json',
'README.md'
]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.
fengmk2
fengmk2@gmail.com