{"id":20105943,"url":"https://github.com/markthree/go-get-folder-size","last_synced_at":"2025-08-21T10:31:05.114Z","repository":{"id":65536726,"uuid":"593567406","full_name":"markthree/go-get-folder-size","owner":"markthree","description":"go concurrently get folder size quickly, can run in nodejs | go 并发快速获取文件夹大小，可以跑在 nodejs 中","archived":false,"fork":false,"pushed_at":"2025-05-10T01:44:36.000Z","size":8316,"stargazers_count":97,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T07:19:51.807Z","etag":null,"topics":["folder-size","go","nodejs","ultrafast","wasm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/go-get-folder-size","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/markthree.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-26T10:32:54.000Z","updated_at":"2025-06-30T09:08:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"18922e3c-34c6-4dfb-8c8a-3878a78bfe02","html_url":"https://github.com/markthree/go-get-folder-size","commit_stats":{"total_commits":144,"total_committers":1,"mean_commits":144.0,"dds":0.0,"last_synced_commit":"885d1d52f5610dbd7ec93a4a0d7168e66e7907f1"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/markthree/go-get-folder-size","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fgo-get-folder-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fgo-get-folder-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fgo-get-folder-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fgo-get-folder-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markthree","download_url":"https://codeload.github.com/markthree/go-get-folder-size/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fgo-get-folder-size/sbom","scorecard":{"id":620565,"data":{"date":"2025-08-11","repo":{"name":"github.com/markthree/go-get-folder-size","commit":"62b6be4a99d82f36b9b1ab57703a65d18c70ae60"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"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":10,"reason":"no dangerous workflow patterns detected","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":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: wasm/main.wasm:1"],"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":"Code-Review","score":0,"reason":"Found 0/30 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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:4","Info: no jobLevel write permissions found"],"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/markthree/go-get-folder-size/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/markthree/go-get-folder-size/release.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"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-21T05:07:32.451Z","repository_id":65536726,"created_at":"2025-08-21T05:07:32.451Z","updated_at":"2025-08-21T05:07:32.451Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271462682,"owners_count":24764017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"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":["folder-size","go","nodejs","ultrafast","wasm"],"created_at":"2024-11-13T17:48:40.246Z","updated_at":"2025-08-21T10:31:04.711Z","avatar_url":"https://github.com/markthree.png","language":"JavaScript","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"100%\" height=\"100%\" src=\"./snapshot.gif\" /\u003e\n    \u003ch1\u003e\u003ca href=\"https://github.com/markthree/go-get-folder-size\"\u003ego-get-folder-size\u003c/a\u003e\u003c/h1\u003e\n    \u003cp\u003ego concurrently get folder size quickly, can run in nodejs\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## README 🦉\n\n[简体中文](./README_ZH.md) | English\n\n\u003cbr /\u003e\n\n## features\n\n- 🐉 [ipc go](./src/bin.ts)\n- 🦕 [binary go](./src/bin.ts)\n- 🦖 [native node](./src/node.ts)\n- 🐊 [wasm go](./src/wasm.ts)\n\n\u003cbr /\u003e\n\n## motivation\n\nI want to know the folder size quickly, but the nodejs implementation of\n[get-folder-size](https://github.com/alessioalex/get-folder-size) is slow, so\nusing go implements a recursive get folder size that runs in nodejs and is\n`7 ~ 20` times faster than the node native solution under normal circumstances。\n\n\u003cbr /\u003e\n\n## Usage\n\n### npm\n\n#### install\n\n```shell\nnpm install go-get-folder-size\n```\n\n#### cli\n\n```shell\n# Binary go, fastest\nnpx go-get-folder-size\n```\n\n#### program\n\n```ts\nimport {\n  getFolderSize,\n  getFolderSizeBin,\n  getFolderSizeWasm,\n} from \"go-get-folder-size\";\n\nconst base = \"./\"; // The directory path you want to get\n\nawait getFolderSizeBin(base); // Binary go, fastest\n\nawait getFolderSize(base); // native node\n\nawait getFolderSizeWasm(base); // Wasm go，slowest\n```\n\n##### IPC\n\nSuitable for multi-path\n\n```ts\nimport { createGetFolderSizeBinIpc } from \"go-get-folder-size\";\n\nconst { getFolderSizeWithIpc, close } = createGetFolderSizeBinIpc();\n\nPromise.all([\n  getFolderSizeWithIpc(\"./\"),\n  getFolderSizeWithIpc(\"../\"),\n])\n  .then((vs) =\u003e console.log(vs))\n  .finally(close); // Manual close is required\n```\n\n\u003cbr /\u003e\n\n### go\n\n#### cli\n\n```shell\ngo install github.com/markthree/go-get-folder-size\n```\n\n```shell\ngo-get-folder-size\n```\n\n#### program\n\n```shell\n# Super invincible fast\ngo get github.com/markthree/go-get-folder-size\n```\n\n```go\npackage main\n\nimport (\n\tgetFolderSize \"github.com/markthree/go-get-folder-size/src\"\n)\n\nfunc main() {\n\tsize, err := getFolderSize.Invoke(\"./\") // Concurrent running, invincible fast\n\n  size2 := getFolderSize.LooseInvoke(\"./\") // Sometimes we may encounter inaccessible files, and we can set 'loose' to ignore them\n}\n```\n\n## loose\n\nSometimes we may encounter inaccessible files, and we can set `loose` to ignore\nthem\n\n### cli\n\n```shell\ngo-get-folder-size --loose\n```\n\n### program\n\n```ts\nimport {\n  getFolderSize,\n  getFolderSizeBin,\n  getFolderSizeWasm,\n} from \"go-get-folder-size\";\n\nconst base = \"./\"; // The directory path you want to get\nconst pretty = false; // Human readable way\nconst loose = true;\n\nawait getFolderSizeBin(base, pretty, { loose }); // Binary go, fastest\n\nawait getFolderSize(base, pretty, { loose }); // native node\n\nawait getFolderSizeWasm(base, pretty, { loose }); // Wasm go，slowest\n```\n\n\u003cbr /\u003e\n\n## stack\n\n- [vite](https://github.com/vitejs/vite)\n- [goreleaser](https://github.com/goreleaser/goreleaser)\n\n\u003cbr /\u003e\n\n## License\n\nMade with [markthree](https://github.com/markthree)\n\nPublished under [MIT License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fgo-get-folder-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkthree%2Fgo-get-folder-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fgo-get-folder-size/lists"}