mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-05 05:55:46 +00:00
2.0 KiB
2.0 KiB
fs.readdirSyncRecursive
Read a directory recursively.
Install
npm install fs-readdir-recursive
Example
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. By default, filter is:
function (x) {
return x[0] !== '.'
}
Which basically just ignores . files.