fs-readdir-recursive

Recursively read a directory

MIT 7 个版本
安装
npm install fs-readdir-recursive
yarn add fs-readdir-recursive
pnpm add fs-readdir-recursive
bun add fs-readdir-recursive
README

fs.readdirSyncRecursive

NPM version Build status Test coverage Dependency Status License Downloads Gittip

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 with three params(name, index, dir). By default, filter is:

function (name) {
  return name[0] !== '.'
}

Which basically just ignores . files.

版本列表
1.1.0 2017-11-10
1.0.0 2015-09-27
0.1.2 2015-05-18
0.1.1 2015-03-22
0.1.0 2014-11-16
0.0.2 2014-04-30
0.0.1 2013-10-03