{@inheritDoc}
@see \Psr\Http\Message\UriInterface::withPath()
500963
public function withPath($path): UriInterface
   {
       if (!is_string($path)
        || !($parsedPath = $this->parsePath($path))) {
           throw new InvalidArgumentException(
               "Can't get with path: invalid expression");
       }
       return $this->with("path", $parsedPath);
   }
342349
public function setPath($path)
    {
        if ($path) {
            $this->not_cleared_path = $path;
            $this->doClearPath();
        } else {
            $this->path = '';
        }

        return $this;
    }
108139
String withPath(String[] path) {
        StringBuilder sb = new StringBuilder();
        if (path.length > 0) {
            sb.append(" (with path ");
            for (int i = 0; i < path.length - 1; i++) {
                sb.append(path[i]);
                sb.append(".");
            }
            sb.append(path[path.length - 1]);
            sb.append(") ");
        }
        return sb.toString();

    }
384095
public function resolveLocalPath($path)
    {
        if (is_array($path)) {
            $paths  = array();
            foreach ($path as $p) {
                $paths[]    = $this->resolveLocalPath($p);
            }
            return $paths;
        } else {
            $path   = FileSystem::normalizeDirectorySeparator($path);
            if (strpos($path, $this->getRepositoryPath()) === 0) {
                $path  = substr($path, strlen($this->getRepositoryPath()));
            }
            return ltrim($path, '/');
        }
    }
1194479
public function setPath($path)
    {
        if (!is_string($path)) {
            $path = $this->app->url($path);
        }
        $this->path = $path.'#';

        return $this;
    }
1319637
public static function getPath($url, $withParameters = false)
    {
        $urlInfo = static::info($url);

        return $withParameters ? ArrayHelper::get($urlInfo, 'path.with_parameters', null, true) : ArrayHelper::get($urlInfo, 'path.plain', null, true);
    }
818526
public function url($withParams = true)
    {
        if ($withParams) {
            return (string)$this->uri;
        } else {
            return $this->root() . $this->uri->path;
        }
    }
1029897
public function withPath($path)
    {
        // if the path is absolute, then clear basePath
        if (substr($path, 0, 1) == '/') {
            $clone->basePath = '';
        }
        $this->path = $this->filterQuery($path);

        return $this;
    }
167550
public function withPath($path)
    {
        if (!is_string($path) || strpos($path, '#') !== false || strpos($path, '?') !== false) {
            throw new \InvalidArgumentException('Path must be a string and cannot contain a fragment or query string');
        }

        if (!empty($path) && '/' !== substr($path, 0, 1)) {
            $path = '/' . $path;
        }

        return $this->_clone('path', $this->filterPath($path));
    }
368694
private function withPath($path)
    {
        $params = $this->getOptions(true);

        return $this->getBucketKey($path) + $params;
    }
1022957
private function action2path($s)
	{
		$s = preg_replace('#(.)(?=[A-Z])#', '$1-', $s);
		$s = strtolower($s);
		$s = rawurlencode($s);
		return $s;
	}
346625
public function withPath(UrlPathInterface $path): UrlInterface
    {
        return new self($this->myScheme, $this->myHost, $this->myPort, $this->myPath->withUrlPath($path), $this->myQueryString, $this->myFragment);
    }
1162503
public function assertPathBeginsWith($path)
    {
        $actualPath = parse_url($this->driver->getCurrentURL(), PHP_URL_PATH) ?? '';

        PHPUnit::assertStringStartsWith(
            $path, $actualPath,
            "Actual path [{$actualPath}] does not begin with expected path [{$path}]."
        );

        return $this;
    }
646068
public function urlPath($withParams = false)
    {
        $path = $this->server('request_uri');

        if (!$withParams)
        {
            $position = mb_strpos($path, '?');
            if ($position !== false)
            {
                $path = mb_substr($path, 0, $position);
            }
        }

        return $path;
    }
472218
public function setPath($path)
	{
		if($path !== false)
			$path = trim($path, '/');

		$this->setProperty('path', $path);

		return $this;
	}
903800
public function srcDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->srcDir = rtrim($path, '/');

        return $this;
    }
802875
public static function concat($path, $withPath, $separator = '/')
	{
		$path = rtrim($path, $separator);
		$withPath = ltrim($withPath, $separator);
		$fullPath = null;
		
		if ($path == '' || $withPath == '') {
			$fullPath = $path . $withPath;
		} else {
			$fullPath = $path . $separator . $withPath;
		}
		
		return $fullPath;
	}