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

/size-on-disk/

    Package Sidebar

    Install

    npm i size-on-disk

    Weekly Downloads

    24

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • alessioalex