Nightingale Posing Mischievously

    diskusage-ng
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    diskusage-ng - get disk usage info in pure JavaScript and without any dependencies

    Build Status

    Supported operating systems:

    • Windows (via WMIC)
    • OSX/Linux/Posix (via df)

    Usage

    var diskusage = require('diskusage-ng');
    
    diskusage('/home/me', function(err, usage) {
    	if (err) return console.log(err);
    
    	console.log(usage.total);
    	console.log(usage.used);
    	console.log(usage.available);
    });
    
    

    Commands

    npm run test
    

    Credits

    • Thanks to @xiaoxiangmoe for providing TypeScript type definitions.

    • Thanks to @Congelli501 for replacing child_process.exec with child_process.execFile on POSIX systems making the code much more secure.

    • Thanks to @mintaka-orionis for fixing long paths issue on POSIX systems.

    Install

    npm i diskusage-ng

    DownloadsWeekly Downloads

    559

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    14.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • iximiuz