resolve

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

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.

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

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.