Get the full contents of the storage file.

@return array
325139
protected function getContents()
    {
        // Cancel if the file doesn't exist
        if (!$this->getFilesystem()->has($this->getFilepath())) {
            return [];
        }

        // Get and parse file
        if ($this->contents === null) {
            $this->contents = $this->getFilesystem()->read($this->getFilepath());
            $this->contents = json_decode($this->contents, true);
        }

        return (array) $this->contents;
    }
244452
public function toArray()
    {
        $data = [];

        $storages = $this->preloadAllStorages();

        foreach ($storages as $url=>$storage) {

            $prefix = $this->keyPrefix($url);

            $data[$prefix] = $storage->toArray();

        }

        return $data;
    }
638161
public function getData()
    {
        $data   = [];
        $path   = $this->getPath();
        $dir    = new Folder($path);
        $files  = (array) $dir->find('.*\.php');

        if (count($files) > 0) {
            foreach ($files as $file) {
                $name     = FS::filename($file);
                $segments = explode('_', $name);
                $version  = array_shift($segments);
                $class    = Inflector::camelize(implode('_', $segments));

                $data[$version] = [
                    'class' => $class,
                    'path'  => $path . DS . $file
                ];
            }
        }

        return $data;
    }
902934
public function fileList()
    {
        $result = array();

        $dirContent = opendir($this->_dirPath);
        while (($file = readdir($dirContent)) !== false) {
            if (($file == '..')||($file == '.')) {   continue;
            }

            if(!is_dir($this->_dirPath . '/' . $file) ) {
                $result[] = $file;
            }
        }
        closedir($dirContent);

        return $result;
    }
661422
public function getFileContent()
    {
        $filepath = $this->getFilePath();

        if (is_file($filepath)) {
            $wordsArray = include $filepath;
            asort($wordsArray);

            return $wordsArray;
        }

        return false;
    }
169185
public function getItems()
    {
        $state = $this->state;

        return $this->once('items', function () use ($state) {
            $files = $this->getFiles();

            if (!$files) {
                return [];
            }

            $limit = $state->get('list.limit', 100);
            $items = [];

            /** @var \SplFileInfo $file */
            foreach ($files as $file) {
                $item = unserialize(file_get_contents($file->getPathname()));

                $item['id'] = $file->getBasename();

                $items[$file->getMTime()] = $item;
            }

            krsort($items);

            $result = array_slice($items, 0, $limit);

            return $result;
        });
    }
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);
    }
1116913
public function getContent()
	{
		$file = $this->getFileLocation();

		$content = file_get_contents($file);

		return explode(
			$this->getConfig('line_separator'),
			$content
		);
	}
640163
public function getContents()
    {
        $contents = file_get_contents($this->getPath());

        foreach ($this->getReplaces() as $search => $replace) {
            $contents = str_replace('$'.strtoupper($search).'$', $replace, $contents);
        }

        return $contents;
    }
260823
public function getAllDirectories(): array
    {
        $directories = [];

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

            if ($this->hasDirectory($id)) {
                $directories[$id] = $this->getDirectory($id);
            }
        }

        return $directories;
    }
694747
public function getFiles()
    {

        // initialize the array with the files
        $files = array();

        // iterate over the file keys and read the configuration values
        foreach (FileKeys::getServerFileKeys() as $fileKey) {
            $files[$fileKey] = $this->getSystemConfiguration()->getParam($fileKey);
        }

        // return the array with the files
        return $files;
    }
366435
public function data()
    {
        $data = [
            'filesystems' => array_keys((array)Configure::read(self::CONFIGURE_KEY)),
            'instances' => [],
        ];

        foreach ($data['filesystems'] as $filesystem) {
            $data['instances'][$filesystem] = FilesystemRegistry::retrieve($filesystem);
        }

        return $data;
    }
739606
public static function getAll()
    {
        Base::checkOpen();
        if (Base::driver() == "file") {
            return $_SESSION;
        }
        $session = Base::getSessionObject();
        $data_str = $session->read($session->getId());
        if ($data_str === null) {
            return [];
        }
        return unserialize($data_str);
    }
1279598
public function getStoreData()
    {
        if (!isset($this->fileDataCache) || empty($this->fileDataCache)) {
            $data = [];

            if ($this->hasStoreData()) {
                $filename = static::FILE_NAME;
                $contents = file_get_contents("{$this->filepath}/{$filename}");

                if (!empty($contents) && $contents !== false) {
                    $data = Yaml::parse($contents);
                }
            }

            $this->fileDataCache = $data;
        }

        return $this->fileDataCache;
    }
145732
public function getFileList()
    {
        $allfiles = [];

        foreach ($this->filesets as $fs) {
            $ds = $fs->getDirectoryScanner($this->project);

            $files = $ds->getIncludedFiles();

            // We need to store these files keyed by the basedir from DirectoryScanner
            // so that we can resolve the fullpath of the file later.
            if (isset($allfiles[$ds->getBasedir()])) {
                $allfiles[$ds->getBasedir()] = array_merge($allfiles[$ds->getBasedir()], $files);
            } else {
                $allfiles[$ds->getBasedir()] = $files;
            }
        }

        $struc = [];

        foreach ($allfiles as $basedir => $files) {
            foreach ($files as $file) {
                // paths are relative to $basedir above
                $path = strtr(dirname($file), DIRECTORY_SEPARATOR, '/');

                if (!$path || $path == '.') {
                    $path = '/'; // for array index
                }

                $parts = explode('.', basename($file));
                $ext = array_pop($parts);
                if (strlen($ext) == strlen($file)) {
                    $ext = '';
                }

                $f = new PhingFile($basedir, $file);

                $struc[$path][] = [
                    'file' => basename($file),
                    'ext' => $ext,
                    'path' => (($path == '/') ? basename($file) : $path . '/' . basename($file)),
                    'fullpath' => $f->getAbsolutePath()
                ];
            }
        }

        uksort($struc, 'strnatcasecmp');
        foreach ($struc as $key => $ind) {
            usort($ind, [$this, 'sortfiles']);
            $struc[$key] = $ind;
        }

        $tempstruc = $struc;
        $struc = ['/' => $tempstruc['/']];
        $bv = 0;
        foreach ($tempstruc as $key => $ind) {
            $save = $key;
            if ($key != '/') {
                $struc['/'] = $this->setupDirs($struc['/'], explode('/', $key), $tempstruc[$key]);
            }
        }
        uksort($struc['/'], [$this, 'mystrucsort']);

        return $struc;
    }
1372546
public function getContents()
    {
        ob_start();

        $callback = $this->hasContext() ? $this->getClosureForContextRender() : $this->callContextRender();

        call_user_func($callback, $this->getFilename(), $this->getData()->toArray());

        return ltrim(ob_get_clean());

    }
1026679
public function getFileContents()
    {
        $result = null;
        $fsl = $this->getFile()->getFileStorageLocationObject();
        if ($fsl !== null) {
            $app = Application::getFacadeApplication();
            $cf = $app->make('helper/concrete/file');
            try {
                $result = $fsl->getFileSystemObject()->read($cf->prefix($this->fvPrefix, $this->fvFilename));
                if ($result === false) {
                    $result = null;
                }
            } catch (FileNotFoundException $x) {
            }
        }

        return $result;
    }