eZ\Publish\Core\IO\IOMetadataHandler\Flysystem::load PHP Method

load() public method

public load ( $spiBinaryFileId )
    public function load($spiBinaryFileId)
    {
        try {
            $info = $this->filesystem->getMetadata($spiBinaryFileId);
        } catch (FileNotFoundException $e) {
            throw new BinaryFileNotFoundException($spiBinaryFileId);
        }
        $spiBinaryFile = new SPIBinaryFile();
        $spiBinaryFile->id = $spiBinaryFileId;
        $spiBinaryFile->size = $info['size'];
        if (isset($info['timestamp'])) {
            $spiBinaryFile->mtime = new DateTime('@' . $info['timestamp']);
        }
        return $spiBinaryFile;
    }