relativeTo

expect fun relativeTo(other: Path): Path

Returns this path relative to other. This effectively inverts the resolve operator, /. For any two paths a and b that have the same root, a / (b.relativeTo(a)) is equal to b. If both paths don't use the same slash, the resolved path will use the slash of the other path.

Throws

if this path and the other path are not both absolute paths or both relative paths, or if they are both absolute paths but of different roots (C: vs D:, or C: vs \\server, etc.). It will also throw if the relative path is impossible to resolve. For instance, it is impossible to resolve the path ../a relative to ../../b.

actual fun relativeTo(other: Path): Path
actual fun relativeTo(other: Path): Path