kotlin.io.java.io.File.resolveSibling

resolveSibling

fun File.resolveSibling(relative: File): File

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

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.

© 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-sibling.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部