size-on-disk

0.1.0 • Public • Published

size-on-disk

Wrapper over the du command to get a file/folder's size on disk.

Usage

getSize(process.env.FOLDER || process.cwd(), function(err, bytes) {
  if (err) { throw err; }
 
  console.log(bytes + ' bytes');
  console.log((bytes / 1024 / 1024).toFixed(2) + ' Mb');
});

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    19
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    19

Package Sidebar

Install

npm i size-on-disk

Weekly Downloads

19

Version

0.1.0

License

MIT

Last publish

Collaborators

  • alessioalex