public function preparePath(string $file): string
    {
        if (0 === strncmp($file, '$', 1)) {
            return $file;
        }

        $skippable = 0 === strncmp($file, '?', 1) ? '?' : '';
        if ($skippable) {
            $file = substr($file, 1);
        }

        if (!$this->getFilesystem()->isAbsolutePath($file)) {
            $prefix = $this->isRoot()
                ? $this->getBaseDir()
                : $this->getVendorDir() . '/' . $this->getPrettyName();
            $file = $prefix . '/' . $file;
        }

        return $skippable . $this->getFilesystem()->normalizePath($file);
    }