kotlin.io.java.io.File.resolve

resolve

fun File.resolve(relative: File): File

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

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.

© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-file/resolve.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部