{"id":18777270,"url":"https://github.com/iyowei/ls-dir-sync","last_synced_at":"2026-04-29T09:37:01.639Z","repository":{"id":57119758,"uuid":"438920677","full_name":"iyowei/ls-dir-sync","owner":"iyowei","description":"串行扫描文件夹。","archived":false,"fork":false,"pushed_at":"2021-12-18T07:45:59.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T22:19:57.000Z","etag":null,"topics":["dir","fs","iyowei","nodejs","walker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iyowei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-16T08:49:09.000Z","updated_at":"2021-12-31T07:54:23.000Z","dependencies_parsed_at":"2022-08-24T00:21:00.419Z","dependency_job_id":null,"html_url":"https://github.com/iyowei/ls-dir-sync","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/iyowei/ls-dir-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyowei%2Fls-dir-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyowei%2Fls-dir-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyowei%2Fls-dir-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyowei%2Fls-dir-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyowei","download_url":"https://codeload.github.com/iyowei/ls-dir-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyowei%2Fls-dir-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32420350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["dir","fs","iyowei","nodejs","walker"],"created_at":"2024-11-07T20:09:31.998Z","updated_at":"2026-04-29T09:37:01.621Z","avatar_url":"https://github.com/iyowei.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat\u0026logo=Node.js\n[download node.js]: https://nodejs.org/en/download/\n[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\n\n[lsDir]: https://github.com/iyowei/ls-dir\n[scanDirEach]: https://github.com/iyowei/scan-dir-each\n[scanDirEachSync]: https://github.com/iyowei/scan-dir-each-sync\n[scanDirSync]: https://github.com/iyowei/scan-dir-sync\n[scanDir]: https://github.com/iyowei/scan-dir\n\n# lsDirSync(path)\n\n\u003e 串行扫描文件夹。\n\n## 使用\n\n- `path` 待扫描的路径，**必需提供**，{String}\n- 返回，扫描结果 { Array }\n\n```js\nimport { log } from \"console\";\nimport lsDirSync from \"@iyowei/ls-dir-sync\";\n\nlog(lsDirSync(process.cwd()));\n\n/**\n * [\n *   {\n *     path: '',\n *     dirent: [Dirent]\n *   },\n *   ...\n * ]\n */\n```\n\n## 安装\n\n[![Node Version Badge][node version badge]][download node.js]\n\n```shell\n# Pnpm\npnpm add @iyowei/ls-dir-sync\n\n# yarn\nyarn add @iyowei/ls-dir-sync\n\n# npm\nnpm add @iyowei/ls-dir-sync\n```\n\n## 相关\n\n- [**`lsDir()`**][lsDir]，并行扫描文件夹；\n- [**`scanDirEach()`**][scanDirEach]，可在扫描的同时更新或过滤数据，**并行** 实现；\n- [**`scanDirEachSync()`**][scanDirEachSync]，可在扫描的同时更新或过滤数据，**串行** 实现；\n- [**`scanDirSync()`**][scanDirSync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；\n- [**`scanDir()`**][scanDir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；\n\n## 参与贡献\n\n![PRs Welcome][prs welcome badge]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyowei%2Fls-dir-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyowei%2Fls-dir-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyowei%2Fls-dir-sync/lists"}