lib/index.js
function getDrives() {
        return getDrivesNow().then(function(drives) {
            // if new drive events during scan, redo scan
            if (newEvents) return getDrives();
            recordDrives(drives);

            if (self.options.scanInterval) self.scanTimer = setTimeout(updateDrives, self.options.scanInterval);

            // return drives array, cloned so not altered by future events
            return self.drives.slice(0);
        });
    }
function getDrives() {
        return getDrivesNow().then(function(drives) {
            // if new drive events during scan, redo scan
            if (newEvents) return getDrives();
            recordDrives(drives);

            if (self.options.scanInterval) self.scanTimer = setTimeout(updateDrives, self.options.scanInterval);

            // return drives array, cloned so not altered by future events
            return self.drives.slice(0);
        });
    }
function getDrives ( ) { return getDrivesNow ( ) . then ( function ( drives ) { // if new drive events during scan, redo scan if ( newEvents ) return getDrives ( ) ; recordDrives ( drives ) ; if ( self . options . scanInterval ) self . scanTimer = setTimeout ( updateDrives , self . options . scanInterval ) ; // return drives array, cloned so not altered by future events return self . drives . slice ( 0 ) ; } ) ; }
get drives initially connected
get drives initially connected