resolve

fun File.resolve(relative: File): File (source)

Platform and version requirements: JVM

Adds relative file to this, considering this as a directory. If relative has a root, relative is returned back. For instance, File("/foo/bar").resolve(File("gav")) is File("/foo/bar/gav"). This function is complementary with relativeTo, so f.resolve(g.relativeTo(f)) == g should be always true except for different roots case.

Return concatenated this and relative paths, or just relative if it's absolute.

fun File.resolve(relative: String): File (source)

Platform and version requirements: JVM

Adds relative name to this, considering this as a directory. If relative has a root, relative is returned back. For instance, File("/foo/bar").resolve("gav") is File("/foo/bar/gav").

Return concatenated this and relative paths, or just relative if it's absolute.