private function prepareGallery(Gallery $gallery)
    {
        $time = $gallery->getUpdatedAt() ? $gallery->getUpdatedAt()->getTimestamp() : time();
        $file = new FileInfo($gallery->getName(), $this->driverId, $time, $this->driverOptions['rootName']);
        $file->setHash(
            $this->getDriverId().'_'.FileInfo::encode(
                $this->driverOptions['rootName'].DIRECTORY_SEPARATOR.$gallery->getId()
            )
        );

        return $file;
    }