relativeOrAbsolute

fun relativeOrAbsolute(path: Path, topLevel: File?): Path

This function will shorten / relativize the path, if it is relative to topLevel. Otherwise, the full path will be returned.