kotlin.io.java.io.File.endsWith

endsWith

fun File.endsWith(other: File): Boolean

Platform and version requirements: JVM

Determines whether this file path ends with the path of other file.

If other is rooted path it must be equal to this. If other is relative path then last N components of this must be the same as all components in other, where N is the number of components in other.

Return true if this path ends with other path, false otherwise.

fun File.endsWith(other: String): Boolean

Platform and version requirements: JVM

Determines whether this file belongs to the same root as other and ends with all components of other in the same order. So if other has N components, last N components of this must be the same as in other. For relative other, this can belong to any root.

Return true if this path ends with other path, false otherwise.

© 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/ends-with.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部