{"id":16368601,"url":"https://github.com/simoneb/fast-folder-size","last_synced_at":"2025-04-09T09:09:38.186Z","repository":{"id":38824396,"uuid":"346040655","full_name":"simoneb/fast-folder-size","owner":"simoneb","description":"Node CLI or module to calculate folder size","archived":false,"fork":false,"pushed_at":"2023-11-08T07:29:46.000Z","size":222,"stargazers_count":61,"open_issues_count":7,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-29T17:21:44.023Z","etag":null,"topics":["du","fast","folder","size"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simoneb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-03-09T14:49:28.000Z","updated_at":"2024-06-18T13:53:16.960Z","dependencies_parsed_at":"2024-06-18T13:53:08.203Z","dependency_job_id":"d8e4da37-5651-44ec-89cd-7254892f9e0d","html_url":"https://github.com/simoneb/fast-folder-size","commit_stats":{"total_commits":65,"total_committers":14,"mean_commits":4.642857142857143,"dds":0.3384615384615385,"last_synced_commit":"908ac320c74a67b0c2922e39e6b318b9c41925ea"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Ffast-folder-size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Ffast-folder-size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Ffast-folder-size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simoneb%2Ffast-folder-size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simoneb","download_url":"https://codeload.github.com/simoneb/fast-folder-size/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"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","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":["du","fast","folder","size"],"created_at":"2024-10-11T02:53:14.671Z","updated_at":"2025-04-09T09:09:38.165Z","avatar_url":"https://github.com/simoneb.png","language":"JavaScript","readme":"\u003e The license of this software has changed to AWISC - Anti War ISC License\n\n# fast-folder-size\n\n[![ci](https://github.com/simoneb/fast-folder-size/actions/workflows/ci.yml/badge.svg)](https://github.com/simoneb/fast-folder-size/actions/workflows/ci.yml)\n\nNode CLI or module to calculate folder size.\n\nIt uses:\n\n- [Sysinternals DU](https://docs.microsoft.com/en-us/sysinternals/downloads/du) on Windows, automatically downloaded at\n  installation time because the license does not allow redistribution. See below about specifying the download location.\n- native `du` on other platforms\n\n## Installation\n\n```\nnpm i fast-folder-size\n```\n\n## Usage\n\n### Programmatically\n\n```js\nconst { promisify } = require('util')\nconst fastFolderSize = require('fast-folder-size')\nconst fastFolderSizeSync = require('fast-folder-size/sync')\n\n// callback\nfastFolderSize('.', (err, bytes) =\u003e {\n  if (err) {\n    throw err\n  }\n\n  console.log(bytes)\n})\n\n// promise\nconst fastFolderSizeAsync = promisify(fastFolderSize)\nconst bytes = await fastFolderSizeAsync('.')\n\nconsole.log(bytes)\n\n// sync\nconst bytes = fastFolderSizeSync('.')\n\nconsole.log(bytes)\n```\n\n#### Aborting\n\nThe non-sync version of the API also supports `AbortSignal`, to abort the operation while in progress.\n\n```js\nconst fastFolderSize = require('fast-folder-size')\n\nconst controller = new AbortController()\n\nfastFolderSize('.', { signal: controller.signal }, (err, bytes) =\u003e {\n  if (err) {\n    throw err\n  }\n\n  console.log(bytes)\n})\n\ncontroller.abort()\n```\n\n### Command line\n\n```bash\nfast-folder-size .\n```\n\n### Downloading the Sysinternals DU.zip\n\nBy default the Sysinternals DU.zip is downloaded from https://download.sysinternals.com/files/DU.zip.\n\nIf you need to change this, e.g. to download from an internal package repository\nor re-use an existing du.zip, you can set the **FAST_FOLDER_SIZE_DU_ZIP_LOCATION** environment variable.\n\nFor example:\n\n```shell\nexport FAST_FOLDER_SIZE_DU_ZIP_LOCATION=\"https://your.internal.repository/DU.zip\"\n```\n\nor\n\n```shell\nexport FAST_FOLDER_SIZE_DU_ZIP_LOCATION=\"D://download/du.zip\"\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimoneb%2Ffast-folder-size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimoneb%2Ffast-folder-size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimoneb%2Ffast-folder-size/lists"}