actions/github/codeql-action-v2/node_modules/get-folder-size
2026-01-31 18:56:04 +01:00
..
bin initial commit of actions 2026-01-31 18:56:04 +01:00
example.js initial commit of actions 2026-01-31 18:56:04 +01:00
index.js initial commit of actions 2026-01-31 18:56:04 +01:00
package.json initial commit of actions 2026-01-31 18:56:04 +01:00
README.md initial commit of actions 2026-01-31 18:56:04 +01:00
test.js initial commit of actions 2026-01-31 18:56:04 +01:00

get-folder-size

Get the size of a folder by iterating through its sub-files and folders.

Usage

getFolderSize(folder, [regexIgnorePattern], callback)

Example:

const getSize = require('get-folder-size');

getSize(myFolder, (err, size) => {
  if (err) { throw err; }

  console.log(size + ' bytes');
  console.log((size / 1024 / 1024).toFixed(2) + ' MB');
});

CLI tool

npm i -g get-folder-size
get-folder-size --folder=/my/folder --ignore=node_modules

Size vs Size on disk

This module calculates the actual file size, and not the size on disk.

License

MIT