A simple disk space checker module. Check out the GitHub page for more details.
npm install diskspace
drivespace.exe is not used and df command is used.
npm install diskspace
var diskspace = require('diskspace');
diskspace.check('C', function (err, result)
{
Your code here
});
`
On Windows you change C to the drive letter you want to check. On Linux you use the mount path eg /.
The result of the diskspace check is returned as an object named result.
* result.total is how much the drive has totally.
result.used is how much of the drive is reported as used. On nix this is straight from the df -k command, on Windows it's calculated from result.total - result.free
* result.free is how much free space you have.
* result.status` isn't really that useful unless you want to debug.