{"id":42759716,"url":"https://github.com/pengng/fs-extend","last_synced_at":"2026-01-29T20:31:34.024Z","repository":{"id":57242203,"uuid":"111265692","full_name":"pengng/fs-extend","owner":"pengng","description":"提供扩展原生fs模块不支持的功能","archived":false,"fork":false,"pushed_at":"2019-07-04T13:53:33.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T19:59:00.473Z","etag":null,"topics":["extra","fs"],"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/pengng.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":"2017-11-19T04:59:22.000Z","updated_at":"2019-07-04T13:54:01.000Z","dependencies_parsed_at":"2022-09-04T19:24:08.742Z","dependency_job_id":null,"html_url":"https://github.com/pengng/fs-extend","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pengng/fs-extend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengng%2Ffs-extend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengng%2Ffs-extend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengng%2Ffs-extend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengng%2Ffs-extend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pengng","download_url":"https://codeload.github.com/pengng/fs-extend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pengng%2Ffs-extend/sbom","scorecard":{"id":727088,"data":{"date":"2025-08-11","repo":{"name":"github.com/pengng/fs-extend","commit":"af72fe908784486c69643e1f4ab8a3c809618bcd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/7 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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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"}}]},"last_synced_at":"2025-08-22T13:08:41.666Z","repository_id":57242203,"created_at":"2025-08-22T13:08:41.666Z","updated_at":"2025-08-22T13:08:41.666Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["extra","fs"],"created_at":"2026-01-29T20:31:33.301Z","updated_at":"2026-01-29T20:31:34.016Z","avatar_url":"https://github.com/pengng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fs-extend\n\n#### 提供扩展原生fs模块不支持的功能\n\n### Usage\n\n```bash\nnpm i fs-extend -S\n```\n\n```javascript\nconst fsEx = require('fs-extend')\nfsEx.mkdir('./1/2/3/4/5/6/7/8/9', (err) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log('ok')\n})\n```\n\n### Function\n\n- `mkdir(path, callback)` [递归建立目录](#mkdir)\n- `mkdirSync(path)` [同步递归建立目录](#mkdirsync)\n- `rm(path, callback)`  [删除目录及子目录](#rm)\n- `rmSync(path)` [同步删除目录及子目录](#rmsync)\n- `find(path, pattern, callback)` [查找`path`目录及子目录下匹配`pattern`的文件和目录。](#find)\n- `findSync(path, pattern)` [同步查找`path`目录及子目录下匹配`pattern`的文件和目录。](#findsync)\n- `listFiles(path, callback)` [列出目录及子目录下所有文件](#listfiles)\n- `listFilesSync(path)` [同步列出目录及子目录所有文件](#listfilessync)\n- `empty(path, callback)` [判断目录是否空目录](#empty)\n- `emptySync(path)` [同步判断目录是否空目录](#emptysync)\n\n#### mkdir\n\n- `path` **\\\u003cstring\\\u003e** 目录路径\n- `callback` **\\\u003cFunction\\\u003e**\n  - `err` **\\\u003cError\\\u003e**\n\n递归建立目录\n\n```javascript\nfsEx.mkdir('./1/2/3/4/5/6/7/8/9', (err) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log('ok')\n})\n```\n\n#### mkdirSync\n\n同步递归建立目录\n\n- `path` **\\\u003cstring\\\u003e**\n\n```javascript\ntry {\n  fsEx.mkdirSync('./1/2/3/4/5/6/7/8/9')\n  console.log('ok')\n} catch (err) {\n  console.error(err)\n}\n```\n\n#### rm\n\n删除目录及子目录\n\n- `path` **\\\u003cstring\\\u003e** 目录路径\n- `callback` **\\\u003cFunction\\\u003e**\n  - `err` **\\\u003cError\\\u003e**\n\n```javascript\nfsEx.rm('./1', (err) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log('ok')\n})\n```\n\n#### rmSync\n\n同步删除目录及子目录。\n\n- `path` **\\\u003cstring\\\u003e** 删除的目录\n\n```javascript\ntry {\n  fsEx.rmSync('./1')\n  console.log('ok')\n} catch (err) {\n  console.error(err)\n}\n```\n\n#### find\n\n查找`path`目录及子目录下匹配`pattern`的文件和目录。\n\n- `path` **\\\u003cstring\\\u003e** 查找的目录。\n- `pattern` **\\\u003cstring\\\u003e | \\\u003cRegExp\\\u003e** 查找的模式。\n- `callback` **\\\u003cFunction\\\u003e**\n  - `err` **\\\u003cError\\\u003e**\n  - `result` **\\\u003cstring[]\\\u003e** 查找的结果。\n\n```javascript\nfsEx.find('.', '.jpg', (err, result) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log(result)\n})\n```\n\n#### findSync\n\n同步查找`path`目录及子目录下匹配`pattern`的文件和目录。\n\n- `path` **\\\u003cstring\\\u003e** 目录路径。\n- `pattern` **\\\u003cstring\\\u003e | \\\u003cRegExp\\\u003e** 查找的模式。\n\n```javascript\ntry {\n  const result = fsEx.findSync('.', '.jpg')\n  console.log(result)\n} catch (err) {\n  console.error(err)\n}\n```\n\n#### listFiles\n\n列出目录及子目录下所有文件。\n\n- `path` **\\\u003cstring\\\u003e** \n- `callback` **\\\u003cFunction\\\u003e**\n  - `err` **\\\u003cError\\\u003e** \n  - `result` **\\\u003cstring[]\\\u003e** 文件列表。\n\n```javascript\nfsEx.listFiles('.', (err, result) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log(result)\n})\n```\n\n#### listFilesSync\n\n同步列出目录及子目录所有文件。\n\n```javascript\ntry {\n  const result = fsEx.listFilesSync('.')\n  console.log(result)\n} catch (err) {\n  console.error(err)\n}\n\n```\n\n#### empty\n\n判断目录是否空目录\n\n```javascript\nfsEx.empty('.', (err, isEmpty) =\u003e {\n  if (err) {\n    return console.error(err)\n  }\n  console.log('isEmpty: %s', isEmpty)\n})\n```\n\n#### emptySync\n\n同步判断目录是否空目录。\n\n- `path` **\\\u003cstring\\\u003e**\n\n```javascript\ntry {\n  const isEmpty = fsEx.emptySync('.')\n  console.log('isEmpty: %s', isEmpty)\n} catch (err) {\n  console.error(err)\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengng%2Ffs-extend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpengng%2Ffs-extend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpengng%2Ffs-extend/lists"}