Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Use native node fs API to calculate directory size. du -sh implementation.
CoffeeScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
README.md
du-sync.coffee
package.json

README.md

node-du

Use native Node.js fs API to calculate directory size (du -sh implementation)

(sync version)

Install

npm install du-sync

Synopsis

var du = require("du-sync")
var filesize = require("filesize")

var dirsize = du("path/to/your/folder")

// or
var dirsize = du.readSizeRecursiveSync("path/to/your/folder")

console.log( filesize(dirsize) )
Something went wrong with that request. Please try again.