public function disks($parse = true)
    {
        if ($this->host_os !== 'WINDOWS') {
            $result = shell_exec('df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs');
        } else {
            $result = '';
        }

        if ($parse) {
            if (empty($result)) {
                return [];
            }

            $lines = explode(PHP_EOL, trim($result));
            unset($lines[0]);

            $columns = [
                'Filesystem',
                'Type',
                'Size',
                'Used',
                'Avail',
                'Used (%)',
                'Mounted'
            ];

            $result = [];
            foreach ($lines as $row => $line) {
                $column = array_values(array_filter(explode(' ', $line), 'strlen'));
                foreach ($columns as $col => $key) {
                    $result[$row][$key] = @$column[$col];
                }
            }
            $result = array_values($result);
        }
        return $result;
    }
public function disks($parse = true)
    {
        if ($this->host_os !== 'WINDOWS') {
            $result = shell_exec('df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs');
        } else {
            $result = '';
        }

        if ($parse) {
            if (empty($result)) {
                return [];
            }

            $lines = explode(PHP_EOL, trim($result));
            unset($lines[0]);

            $columns = [
                'Filesystem',
                'Type',
                'Size',
                'Used',
                'Avail',
                'Used (%)',
                'Mounted'
            ];

            $result = [];
            foreach ($lines as $row => $line) {
                $column = array_values(array_filter(explode(' ', $line), 'strlen'));
                foreach ($columns as $col => $key) {
                    $result[$row][$key] = @$column[$col];
                }
            }
            $result = array_values($result);
        }
        return $result;
    }
public function disks ( $ parse = true ) { if ( $ this -> host_os !== 'WINDOWS' ) { $ result = shell_exec ( 'df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs' ) ; } else { $ result = '' ; } if ( $ parse ) { if ( empty ( $ result ) ) { return [ ] ; } $ lines = explode ( PHP_EOL , trim ( $ result ) ) ; unset ( $ lines [ 0 ] ) ; $ columns = [ 'Filesystem' , 'Type' , 'Size' , 'Used' , 'Avail' , 'Used (%)' , 'Mounted' ] ; $ result = [ ] ; foreach ( $ lines as $ row => $ line ) { $ column = array_values ( array_filter ( explode ( ' ' , $ line ) , 'strlen' ) ) ; foreach ( $ columns as $ col => $ key ) { $ result [ $ row ] [ $ key ] = @ $ column [ $ col ] ; } } $ result = array_values ( $ result ) ; } return $ result ; }
Get disk file system table

@return string
Get disk file system table