lib/disks.js
function detail(drive, callback) {
    async.series(
        {
            used: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetail('df -kl | grep ' + drive + ' | awk \'{print $3}\'', callback);
                        break;
                    case'linux':
                    default:
                        getDetail('df -P | grep ' + drive + ' | awk \'{print $3}\'', callback);
                }
            },
            available: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetail('df -kl | grep ' + drive + ' | awk \'{print $4}\'', callback);
                        break;
                    case'linux':
                    default:
                        getDetail('df -P | grep ' + drive + ' | awk \'{print $4}\'', callback);
                }
            },
            mountpoint: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetailNaN('df -kl | grep ' + drive + ' | awk \'{print $9}\'', function(e, d){
                            if (d) d = d.trim();
                            callback(e, d);
                        });
                        break;
                    case'linux':
                    default:
                        getDetailNaN('df -P | grep ' + drive + ' | awk \'{print $6}\'', function(e, d){
                            if (d) d = d.trim();
                            callback(e, d);
                        });
                }
            }
        },
        function (err, results) {
            if (err) return callback(err);
            results.freePer = Number(results.available / (results.used + results.available) * 100);
            results.usedPer = Number(results.used / (results.used + results.available) * 100);
            results.total = numeral(results.used + results.available).format('0.00 b');
            results.used = numeral(results.used).format('0.00 b');
            results.available = numeral(results.available).format('0.00 b');
            results.drive = drive;

            callback(null, results);
        }
    );
}
function detail(drive, callback) {
    async.series(
        {
            used: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetail('df -kl | grep ' + drive + ' | awk \'{print $3}\'', callback);
                        break;
                    case'linux':
                    default:
                        getDetail('df -P | grep ' + drive + ' | awk \'{print $3}\'', callback);
                }
            },
            available: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetail('df -kl | grep ' + drive + ' | awk \'{print $4}\'', callback);
                        break;
                    case'linux':
                    default:
                        getDetail('df -P | grep ' + drive + ' | awk \'{print $4}\'', callback);
                }
            },
            mountpoint: function (callback) {
                switch (os.platform().toLowerCase()) {
                    case'darwin':
                        getDetailNaN('df -kl | grep ' + drive + ' | awk \'{print $9}\'', function(e, d){
                            if (d) d = d.trim();
                            callback(e, d);
                        });
                        break;
                    case'linux':
                    default:
                        getDetailNaN('df -P | grep ' + drive + ' | awk \'{print $6}\'', function(e, d){
                            if (d) d = d.trim();
                            callback(e, d);
                        });
                }
            }
        },
        function (err, results) {
            if (err) return callback(err);
            results.freePer = Number(results.available / (results.used + results.available) * 100);
            results.usedPer = Number(results.used / (results.used + results.available) * 100);
            results.total = numeral(results.used + results.available).format('0.00 b');
            results.used = numeral(results.used).format('0.00 b');
            results.available = numeral(results.available).format('0.00 b');
            results.drive = drive;

            callback(null, results);
        }
    );
}
function detail ( drive , callback ) { async . series ( { used : function ( callback ) { switch ( os . platform ( ) . toLowerCase ( ) ) { case 'darwin' : getDetail ( 'df -kl | grep ' + drive + ' | awk \'{print $3}\'' , callback ) ; break ; case 'linux' : default : getDetail ( 'df -P | grep ' + drive + ' | awk \'{print $3}\'' , callback ) ; } } , available : function ( callback ) { switch ( os . platform ( ) . toLowerCase ( ) ) { case 'darwin' : getDetail ( 'df -kl | grep ' + drive + ' | awk \'{print $4}\'' , callback ) ; break ; case 'linux' : default : getDetail ( 'df -P | grep ' + drive + ' | awk \'{print $4}\'' , callback ) ; } } , mountpoint : function ( callback ) { switch ( os . platform ( ) . toLowerCase ( ) ) { case 'darwin' : getDetailNaN ( 'df -kl | grep ' + drive + ' | awk \'{print $9}\'' , function ( e , d ) { if ( d ) d = d . trim ( ) ; callback ( e , d ) ; } ) ; break ; case 'linux' : default : getDetailNaN ( 'df -P | grep ' + drive + ' | awk \'{print $6}\'' , function ( e , d ) { if ( d ) d = d . trim ( ) ; callback ( e , d ) ; } ) ; } } } , function ( err , results ) { if ( err ) return callback ( err ) ; results . freePer = Number ( results . available / ( results . used + results . available ) * 100 ) ; results . usedPer = Number ( results . used / ( results . used + results . available ) * 100 ) ; results . total = numeral ( results . used + results . available ) . format ( '0.00 b' ) ; results . used = numeral ( results . used ) . format ( '0.00 b' ) ; results . available = numeral ( results . available ) . format ( '0.00 b' ) ; results . drive = drive ; callback ( null , results ) ; } ) ; }
Retrieve space information about one drive.

@param drive
@param callback
Retrieve space information about one drive .