JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 234523
  • Score
    100M100P100Q163397F
  • License MIT

Get the size of a folder by recursively iterating through all its sub(files && folders).

Package Exports

  • get-folder-size

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-folder-size) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

get-folder-size

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

Usage

getFolderSize(folder, [regexIgnorePattern], callback)

Example:

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

getSize(myFolder, function(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