du-wrapper

v3.0.1
wrapper around du cli, gets the size of a dir in bytes, returns a promise

Wrapper around DU command, returns a promise.

returns size of dir in KB

let du = require('./index');
let path = __dirname;

du(path)
  .then((res) => {
    console.log(res); // res = 174 (KB)
  })
  .catch((err) => {
    console.log(err);
  });
npm i du-wrapper

Metadata

  • MIT
  • Whatever
  • phil helm
  • released 2/16/2017

Downloads

Maintainers