relative

open suspend fun relative(root: Path, path: Path): String?(source)

Deprecated

Use relativize instead

Replace with

relativize(root, path)

Computes the relative path from a given root path to the specified path.

Return

The relative path as a string, or null if the paths cannot be relativized.

Parameters

root

The root directory path from which the relative path is calculated.

path

The target path to calculate the relative path to.