private function getFile($directory, $content)
    {
        $hash = \md5($content);

        if (!\array_key_exists($hash, $this->files)) {
            $file = \tempnam($directory, '');
            $this->fs->dumpFile($file, $content);
            $this->files[$hash] = \basename($file);
        }

        return $this->files[$hash];
    }