sxoinas12 82e781b8aa Graph & Tree | 5 lat temu | |
---|---|---|
.. | ||
LICENSE | 5 lat temu | |
README.md | 5 lat temu | |
index.js | 5 lat temu | |
package.json | 5 lat temu |
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.