protected function getUrlPath($path, $exitsFile = false): string
    {
        $this->checkRoot();

        $path = $this->cleanPathInternal($path);
        if ($this->isVirtual($path)) {
            $path = $this->get($path);
        }

        $subject = $path;
        $pattern = '/^' . preg_quote($this->root, '/') . '/i';

        if ($exitsFile && !$this->isVirtual($path) && !file_exists($path)) {
            $subject = null;
        }

        return ltrim(preg_replace($pattern, '', $subject), '/');
    }