Get the list of partitions
@throws \Exception
@return models\Storage\DiskPartition[]
968368
public function getAll(){
        $rest = $this->getService( self::API_STORAGE_PARTITION);
        $rest->GET();

        return $rest->getResultAsArray( models\Storage\DiskPartition::class);
    }
1196119
public function getDisk()
    {
        if ($this->disk_instance === null) {
            // Create disk class
            $class = "\\Torann\\MediaSort\\Disks\\" . ucfirst($this->config('disk'));

            // Verify disk
            if (class_exists($class) === false) {
                throw new InvalidClassException("Disk type \"{$class}\" not found.");
            }

            // Create disk instance
            $this->disk_instance = Container::getInstance()->makeWith($class, ['media' => $this]);
        }

        return $this->disk_instance;
    }
1288525
public function getFiles() : array
    {
        if(!$this->_isLoaded) {
            $this->load();
        }

        return array_map(function($file) {
            return new File($this->getPath(). DIRECTORY_SEPARATOR .$file);
        }, $this->_files);
    }
820433
public function getRelatedParts()
    {
        if ( is_null( $this->getMainPart() ) )
        {
            return array_slice( $this->parts, 0 );
        }
        return array_slice( $this->parts, 1 );
    }
1353204
public function getParts()
    {
        return array(
            'scheme'   => $this->scheme,
            'user'     => $this->username,
            'pass'     => $this->password,
            'host'     => $this->host,
            'port'     => $this->port,
            'path'     => $this->path,
            'query'    => $this->query,
            'fragment' => $this->fragment,
        );
    }
908655
public function diskSpaceInfo()
    {
        $body = '<?xml version="1.0" encoding="utf-8" ?><D:propfind xmlns:D="DAV:">
            <D:prop><D:quota-available-bytes/><D:quota-used-bytes/></D:prop></D:propfind>';

        $response = $this->sendRequest(
            'PROPFIND',
            '/',
            [
                'headers' => [
                    'Depth' => '0'
                ],
                'body' => $body
            ]
        );

        $decodedResponseBody = $this->getDecodedBody($response->getBody());

        $info = (array) $decodedResponseBody->children('DAV:')->response->propstat->prop;
        return [
            'usedBytes' => $info['quota-used-bytes'],
            'availableBytes' => $info['quota-available-bytes']
        ];
    }
793379
public function getFiles()
    {
        $dir = WINDWALKER_CACHE . '/profiler';

        if (!is_dir($dir)) {
            return [];
        }

        return new \RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS));
    }
100328
public function lists()
    {
        $parts = explode('.', $this->file->filename);

        $extension = array_pop($parts);

        $name = $this->file->path(implode('.', $parts));

        $files = glob($this->file->realPath("{$name}-*"));

        array_walk($files, function (&$file) {
            $file = substr($file, strrpos($file, '/') + 1, strlen($file));
            $file = $this->file->path($file);
        });

        return collect($files);
    }
347706
public function getFileSets()
    {
        $filesets = [];
        foreach ($this->getFileSetIDs() as $fsID) {
            $fs = FileSet::getByID($fsID);
            if ($fs !== null) {
                $filesets[] = $fs;
            }
        }

        return $filesets;
    }
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;
    }
101731
public function getBins()
    {
        if (!isset($this->package['bin'])) {
            return array();
        }

        $bins = array();
        foreach ($this->package['bin'] as $bin) {
            $bins []= $this->getAbsolutePath($bin);
        }

        return $bins;
    }
1330107
public function getFolders()
    {
        if(!isset($this->Folders)){
            $this->Folders = new FolderCollection($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(),"folders"));
        }
        return $this->Folders;
    }
712597
def getPartitionList(self):
        
        if self._partList is None:
            self._partList = []
            for (disk,parts) in self.getPartitionDict().iteritems():
                for part in parts:
                    self._partList.append((disk,part))
        return self._partList
1016648
private function getStorage()
    {
        $folder = $this->folder;
        if (!is_dir($folder)) {
            if (!mkdir($folder, 0777, true)) {
                throw new Exception("Can not create Filesystem folder: '" . $folder . "'. Please verify permissions.");
            }
        }

        return $folder;
    }
168921
public function listFiles(): array {

        try {
            return array_column(
                array_map(function($key, $archive) {
                    return [ "key" => $key, "files" => $archive->listFiles() ];
                }, array_keys($this->zip_archives), $this->zip_archives),
            "files", "key");
        } catch (ZipException $ze) {
            throw $ze;
        }

    }
823314
public function getAll(){
        $rest = $this->getService( self::API_STORAGE_DISK);
        $rest->GET();

        return $rest->getResultAsArray( models\Storage\StorageDisk::class);
    }
1045329
def _GetSerializedPartitionList(self):
        
        partition_list = list()
        
        for part in self.partitions:
            partition_list.append((part.node, unpack("<L", part.hash_value)[0]))

        return partition_list