Get total diskspace and free diskspace using bindings around platform specific calls.
$ npm install diskusage
The module exposes a single function,
check. It takes a path/mount point as the first argument and a callback as the second. The callback takes two arguments
err will be non-zero if somethine went wrong.
info contains two members:
total both of which contain the amount of free space and total used space in bytes.
statvfs under Linux also counts for mount points mounted under the root mount. For example using the mount point
/ as the first parameter would also account for
/run, etc. in the free and total spaces.
var disk = require'diskusage';// get disk usage. Takes path as first parameterdiskcheck'c:'console.loginfofree;console.loginfototal;;
var disk = require'diskusage';// get disk usage. Takes mount point as first parameterdiskcheck'/'console.loginfofree;console.loginfototal;;