joinPath

fun joinPath(base: Uri, vararg pathSegments: String): Uri(source)

Create a new uri which path is the result of joining the path of the base uri with the provided path segments.

  • Note 1: joinPath only affects the path component and all other components (scheme, authority, query, and fragment) are left as they are.

  • Note 2: The base uri must have a path; an error is thrown otherwise.

The path segments are normalized in the following ways:

  • sequences of path separators (/ or \) are replaced with a single separator

  • for file-uris on windows, the backslash-character (\) is considered a path-separator

  • the ..-segment denotes the parent segment, the . denotes the current segment

  • paths have a root which always remains, for instance on windows drive-letters are roots so that is true: joinPath(Uri.file('file:///c:/root'), '../../other').fsPath === 'c:/other'

Parameters

base

An uri. Must have a path.

pathSegments

One more more path fragments