{"id":18576103,"url":"https://github.com/thiagodp/fwalker","last_synced_at":"2026-05-01T19:31:55.599Z","repository":{"id":52756576,"uuid":"177904842","full_name":"thiagodp/fwalker","owner":"thiagodp","description":"📂 Fast and rock-solid asynchronous traversing of directories and files for NodeJS","archived":false,"fork":false,"pushed_at":"2021-04-19T21:36:14.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-20T17:20:58.337Z","etag":null,"topics":["dir","directories","directory","fast","file","fs","list","ls","node","node-js","traverse","walk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiagodp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T02:37:02.000Z","updated_at":"2022-04-03T19:55:00.000Z","dependencies_parsed_at":"2022-09-15T10:11:07.209Z","dependency_job_id":null,"html_url":"https://github.com/thiagodp/fwalker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/thiagodp/fwalker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagodp%2Ffwalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagodp%2Ffwalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagodp%2Ffwalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagodp%2Ffwalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiagodp","download_url":"https://codeload.github.com/thiagodp/fwalker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagodp%2Ffwalker/sbom","scorecard":{"id":880771,"data":{"date":"2025-08-11","repo":{"name":"github.com/thiagodp/fwalker","commit":"081058f6dd63ba9a64d87d7a521b89d0570647d0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":3,"reason":"7 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T08:06:18.383Z","repository_id":52756576,"created_at":"2025-08-24T08:06:18.383Z","updated_at":"2025-08-24T08:06:18.383Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32510630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dir","directories","directory","fast","file","fs","list","ls","node","node-js","traverse","walk"],"created_at":"2024-11-06T23:23:35.425Z","updated_at":"2026-05-01T19:31:55.581Z","avatar_url":"https://github.com/thiagodp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/thiagodp/fwalker.svg?branch=master)](https://travis-ci.org/thiagodp/fwalker)\n[![version](https://img.shields.io/npm/v/fwalker?color=%234CC61E\u0026label=latest%20version)](https://badge.fury.io/js/fwalker)\n\n# fwalker\n\n\u003e Fast and rock-solid asynchronous traversing of directories and files for NodeJS\n\n👉 This library started as a fork of [node-filewalker](https://github.com/oleics/node-filewalker), created by [Oliver Leics](https://github.com/oleics/node-filewalker#mit-license) which is not maintained anymore.\n\n**Main differences from `node-filewalker`:**\n\n- New option [`readStream`](https://github.com/thiagodp/fwalker#readstream)\n- New option [`fs`](https://github.com/thiagodp/fwalker#fs)\n- Dependency updates (security fixes)\n\nThis library is designed to provide maximum reliance paired with maximum throughput/performance. *Please feel free to contribute!*\n\n## Installation\n\n```bash\nnpm install --save fwalker\n```\n\n## Usage\n\nSimple directory listing and disk-usage report:\n\n```js\nvar fwalker = require('fwalker');\n\nfwalker('.')\n  .on('dir', function(p) {\n    console.log('dir:  %s', p);\n  })\n  .on('file', function(p, s) {\n    console.log('file: %s, %d bytes', p, s.size);\n  })\n  .on('error', function(err) {\n    console.error(err);\n  })\n  .on('done', function() {\n    console.log('%d dirs, %d files, %d bytes', this.dirs, this.files, this.bytes);\n  })\n.walk();\n```\n\nCalculate md5-hash for every file:\n\n```js\nvar started = Date.now();\n\nvar createHash = require('crypto').createHash,\n    fwalker = require('fwalker');\n\nvar options = {\n  maxPending: 10, // throttle handles\n};\n\nfwalker('/', options)\n  .on('stream', function(rs, p, s, fullPath) {\n    var hash = createHash('md5');\n    rs.on('data', function(data) {\n      hash.update(data);\n    });\n    rs.on('end', function(data) {\n      console.log(hash.digest('hex'), ('                '+s.size).slice(-16), p);\n    });\n  })\n  .on('error', function(err) {\n    console.error(err);\n  })\n  .on('done', function() {\n    var duration = Date.now()-started;\n    console.log('%d ms', duration);\n    console.log('%d dirs, %d files, %d bytes', this.dirs, this.files, this.bytes);\n  })\n.walk();\n```\n\n## `FWalker` pseudo-class\n\nInherits from [node-fqueue](https://github.com/oleics/node-fqueue).\n\n### Options\n\n#### `maxPending`\n\n- Default: `-1`\n- Maximum asynchronous jobs. Useful to throttle the number of simultaneous disk-operations.\n\n#### `maxAttempts`\n- Default: `3`\n- Maximum reattempts on error.\n- Set to `0` to disable reattempts.\n- Set to `-1` for infinite reattempts.\n\n#### `attemptTimeout`\n- Default: `5000` ms\n- Minimum time to wait before reattempt, in milliseconds.\n- Useful to let network-drives remount, etc.\n\n#### `matchRegExp`\n- Default: `null`\n- A RegExp-instance the path to a file must match in order to emit a \"file\" event.\n- Set to `null` to emit all paths.\n\n#### `recursive`\n- Default: `true`\n- Traverse in a recursive manner.\n- In case you wish to target only the current directory, disable this.\n\n#### `readStream`\n- Default: `fs.createReadStream()`'s [default values](https://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options)\n- New in `fwalker` (it does not exist in node-filewalker)\n- Allow to handle streams better. For example, the following configuration allows to read a text file from a range of bytes:\n```javascript\n\nvar options = {\n  // will read from byte 90 to 99\n  readStream: {\n    start: 90,\n    end: 99\n  },\n  // from simple.txt\n  matchRegExp: /simple\\.txt/\n};\n\nfwalker( '.', options )\n  ...\n```\n\n#### `fs`\n- Default: `fs` from NodeJS\n- New in `fwalker` (it does not exist in node-filewalker)\n- Allow to use a filesystem library different from [fs](https://nodejs.org/api/fs.html), such as [memfs](https://github.com/streamich/memfs).\n- Allow to use in-memory filesystems.\n- Very useful for testing purposes.\n\n\n### Properties\n\n```\nmaxPending\nmaxAttempts\nattemptTimeout\nmatchRegExp\n\npending\ndirs\nfiles\ntotal\nbytes\nerrors\nattempts\nstreamed\nopen\ndetectedMaxOpen\n```\n\n### Methods\n\n```javascript\nwalk()\npause()\nresume()\n```\n\n### Events\n\n- file\n  - relative path\n  - fs.Stats instance\n  - absolute path\n- dir\n  - relative path\n  - fs.Stats instance\n  - absolute path\n- stream\n  - fs.ReadStream instance\n  - relative path\n  - fs.Stats instance\n  - absolute path\n- pause\n- resume\n- done\n- error\n  - instance of Error\n\n**Notice**: There will be no `fs.ReadStream` created if no listener listens to the 'stream'-event.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT) (c) [Thiago Delgado Pinto](https://github.com/thiagodp/) and [Oliver Leics](https://github.com/oleics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagodp%2Ffwalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagodp%2Ffwalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagodp%2Ffwalker/lists"}