|
|
před 2 roky | |
|---|---|---|
| .. | ||
| LICENSE | před 2 roky | |
| README.md | před 2 roky | |
| index.js | před 2 roky | |
| package.json | před 2 roky | |
Read a directory recursively.
npm install fs-readdir-recursive
var 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.