resolveSibling

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

Platform and version requirements: JVM

Adds relative file to this parent directory. If relative has a root or this has no parent directory, relative is returned back. For instance, File("/foo/bar").resolveSibling(File("gav")) is File("/foo/gav").

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

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

Platform and version requirements: JVM

Adds relative name to this parent directory. If relative has a root or this has no parent directory, relative is returned back. For instance, File("/foo/bar").resolveSibling("gav") is File("/foo/gav").

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