private function getFileFromDisk($directory, $source)
    {
        $hash = 'DISK-'.\md5(\realpath($source));
        if (!\array_key_exists($hash, $this->files)) {
            // Check if source is a directory or a file.
            if (\is_dir($source)) {
                $this->fs->mirror($source, $directory.'/'.$hash, null, ['copy_on_windows' => true]);
            } else {
                $this->fs->copy($source, $directory.'/'.$hash);
            }

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

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