Returns an array of all hard disks on the computer.

@return array
765977
public function get()
    {
        $disks = [];

        $result = $this->connection->newQuery()->from(Classes::WIN32_LOGICALDISK)->get();

        foreach($result as $disk) {
            $disks[] = new HardDisk($disk);
        }

        return $disks;
    }
846930
public function getFolders() {

		$result = [];
		$files = glob($this->path . '*', GLOB_ONLYDIR);

		if($files) {
			foreach($files as $f) {
				$result[] = self::getInstance($f);
			}
		}

		return $result;

	}
765273
public function getHD()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Drives');
        }

        // Get partitions
        $partitions = [];
        $partitions_contents = Common::getContents('/proc/partitions');
        if (@preg_match_all('/(\d+)\s+([a-z]{3})(\d+)$/m', $partitions_contents, $partitions_match, PREG_SET_ORDER) > 0) {
            // Go through each match
            foreach ($partitions_match as $partition) {
                $partitions[$partition[2]][] = array(
                    'size' => $partition[1] * 1024,
                    'number' => $partition[3],
                );
            }
        }

        // Store drives here
        $drives = [];

        // Get actual drives
        foreach ((array) @glob('/sys/block/*/device/model', GLOB_NOSORT) as $path) {

            // Parts of the path
            $parts = explode('/', $path);

            // Attempt getting read/write stats
            if (preg_match('/^(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)/', Common::getContents(dirname(dirname($path)).'/stat'), $statMatches) !== 1) {
                // Didn't get it
                $reads = false;
                $writes = false;
            } else {
                // Got it, save it
                list(, $reads, $writes) = $statMatches;
            }

            // Append this drive on
            $drives[] = array(
                'name' => Common::getContents($path, 'Unknown').(Common::getContents(dirname(dirname($path)).'/queue/rotational') == 0 ? ' (SSD)' : ''),
                'vendor' => Common::getContents(dirname($path).'/vendor', 'Unknown'),
                'device' => '/dev/'.$parts[3],
                'reads' => $reads,
                'writes' => $writes,
                'size' => Common::getContents(dirname(dirname($path)).'/size', 0) * 512,
                'partitions' => array_key_exists($parts[3], $partitions) && is_array($partitions[$parts[3]]) ? $partitions[$parts[3]] : false,
            );
        }

        // Return drives
        return $drives;
    }
220434
def disks():
    '''
    
    '''
    if salt.utils.platform.is_freebsd():
        return _freebsd_geom()
    elif salt.utils.platform.is_linux():
        return _linux_disks()
    elif salt.utils.platform.is_windows():
        return _windows_disks()
    else:
        log.trace('Disk grain does not support OS')
347706
public function getFileSets()
    {
        $filesets = [];
        foreach ($this->getFileSetIDs() as $fsID) {
            $fs = FileSet::getByID($fsID);
            if ($fs !== null) {
                $filesets[] = $fs;
            }
        }

        return $filesets;
    }
593133
public function getFiles()
    {
        $iterator = new RecursiveDirectoryIterator(
            $this->directory,
            FilesystemIterator::SKIP_DOTS
        );
        $iterator = new RecursiveIteratorIterator($iterator);
        $iterator->rewind();

        return $iterator;
    }
1102078
def get_volumes(self):
        """"""

        volumes = []
        for disk in self.disks:
            volumes.extend(disk.get_volumes())
        return volumes
194066
private function getBackups()
    {
        $backups = $this->getContainer()->getParameter('nanbando.backup');

        $preset = [];
        if ($name = $this->getParameter('nanbando.application.name')) {
            /** @var PresetStore $presetStore */
            $presetStore = $this->getContainer()->get('presets');
            $preset = $presetStore->getPreset(
                $name,
                $this->getParameter('nanbando.application.version'),
                $this->getParameter('nanbando.application.options')
            );
        }

        return array_merge($preset, $backups);
    }
388730
public function all()
	{
		$path = $this->directory;

		$data = array();

		$dirIterator = new \DirectoryIterator($path);
		foreach ($dirIterator as $folder)
		{
			if ($folder->isDot() || !$folder->isDir())
			{
				continue;
			}

			$name = $folder->getFilename();

			$item = new Auditor($name);

			$files = new \DirectoryIterator($path . DS . $name);
			foreach ($files as $file)
			{
				if ($folder->isDot() || $folder->isDir())
				{
					continue;
				}

				$item->tally(filesize($path . '/' . $name . '/' . $file->getFilename()) / 1024);
			}

			$data[$name] = $item;
		}

		return $data;
	}
130461
public function getRam()
    {
        $return = [];
        $return['swapTotal'] = 0;
        $return['swapFree'] = 0;
        $return['swapInfo'] = [];

        // Get amount of real hard ram, in bytes
        $return['total'] = $this->sysctl['hw.physmem'];

        // Get real
        try {
            $vmstat = $this->exec->exec('vmstat');
            if (preg_match('/\s\d\s\d\s\d\s+\d+\s+(\d+)/', $vmstat, $vmstat_match)) {
                $hard_ram_free = $vmstat_match[1];
                $return['type'] = 'Physical';
                $return['free'] = $return['total'] - ($hard_ram_free * 1024);
            }
        } catch (Exception $e) {
            Errors::add('Linfo Core', 'Error using `vmstat` to get memory usage usage');
        }

        // Get swap
        try {
            $swapinfo = $this->exec->exec('swapctl', '-k');
            @preg_match_all('/^(\S+)\s+(\d+)\s+(\d+)\s+(\d+)/m', $swapinfo, $sm, PREG_SET_ORDER);
            foreach ($sm as $swap) {
                $return['swapTotal'] += $swap[2] * 1024;
                $return['swapFree'] += (($swap[2] - $swap[3]) * 1024);
                $ft = is_file($swap[1]) ? @filetype($swap[1]) : 'Unknown'; // TODO: I'd rather it be Partition or File
                $return['swapInfo'][] = array(
                    'device' => $swap[1],
                    'size' => $swap[2] * 1024,
                    'used' => $swap[3] * 1024,
                    'type' => ucfirst($ft),
                );
            }
        } catch (Exception $e) {
            Errors::add('Linfo Core', 'Error using `swapctl` to get swap usage');
        }

        // Give it
        return $return;
    }
216248
public function returnFullData() {
        
        $aDisk = $this->getSNMP()->realWalk1d(self::OID_DISK);
        $aDiskIo = $this->getSNMP()->realWalk1d(self::OID_DISK_IO);
        
        $aReturn = Array();
        $aReturn['index'] = $aDisk[self::OID_DISK_INDEX];
        $aReturn['device'] = $aDisk[self::OID_DISK_DEVICE];
        $aReturn['path'] = $aDisk[self::OID_DISK_PATH];
        $aReturn['minimum_size'] = $aDisk[self::OID_DISK_MINIMUM];
        $aReturn['minimum_percent'] = $aDisk[self::OID_DISK_MIN_PERCENT];
        $aReturn['total_size'] = $aDisk[self::OID_DISK_TOTAL];
        $aReturn['avaliable_size'] = $aDisk[self::OID_DISK_AVALIABLE];
        $aReturn['used_size'] = $aDisk[self::OID_DISK_USED];
        $aReturn['used_percent'] = $aDisk[self::OID_DISK_USED_PERCENT];
        $aReturn['free_percent'] = $this->freePercentCalculation($aReturn['used_percent']);
        $aReturn['node_percent'] = $aDisk[self::OID_DISK_NODE_PERCENT];
        $aReturn['total_low'] = $aDisk[self::OID_DISK_TOTAL_LOW];
        $aReturn['total_high'] = $aDisk[self::OID_DISK_TOTAL_HIGH];
        $aReturn['avaliable_low'] = $aDisk[self::OID_DISK_AVALIABLE_LOW];
        $aReturn['avaliable_high'] = $aDisk[self::OID_DISK_AVALIABLE_HIGH];
        $aReturn['used_low'] = $aDisk[self::OID_DISK_USED_LOW];
        $aReturn['used_high'] = $aDisk[self::OID_DISK_USED_HIGH];
        $aReturn['error_flag'] = $aDisk[self::OID_DISK_ERROR_FLAG];
        $aReturn['error_msg'] = $aDisk[self::OID_DISK_ERROR_MSG];
        $aReturn['disk_io'] = $aDiskIo;
        return $aReturn;
    }
697403
public function getImagesArray()
    {
        if ($this->_imagesArray === null) {
            $this->_imagesArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_image}}')->select(['id', 'file_id', 'filter_id', 'resolution_width', 'resolution_height'])->indexBy('id'), self::CACHE_KEY_IMAGE);
        }

        return $this->_imagesArray;
    }
654885
def Disks(self):
		

		if not self.disks:  self.disks = clc.v2.Disks(server=self,disks_lst=self.data['details']['disks'],session=self.session)

		return(self.disks)
1137662
public function allDirectories()
    {
        $directories = $this->disk->allDirectories('/');

        return collect($directories)->filter(function ($directory) {
            return !(starts_with($directory, '.'));
        })->map(function ($directory) {
            return DIRECTORY_SEPARATOR.$directory;
        })->reduce(function ($allDirectories, $directory) {
            $parts = explode('/', $directory);
            $name = str_repeat('&nbsp;', (count($parts)) * 4).basename($directory);

            $allDirectories[$directory] = $name;

            return $allDirectories;
        }, collect())->prepend($this->breadcrumbRootLabel, '/');
    }
41261
public function getCropsDisk() {
        if (empty($this->crops_disk)) {
            $this->setCropsDisk($this->makeDisk($this->config['crops_dir']));
        }
        return $this->crops_disk;
    }
1253988
public function getAllDocuments(): array
    {
        $documents = [];

        foreach ($this->filesystem->listContents('/'.$this->path) as $info) {
            $id = $info['filename'];

            if ($this->hasDocument($id)) {
                $documents[$id] = $this->getDocument($id);
            }
        }

        return $documents;
    }
483528
public function listAll()
    {
        $iterator = new \FilesystemIterator($this->getAbsolutePath());
        $iterator->setInfoClass(get_class($this));
        return $iterator;
    }