open class RelativePath : Serializable, Comparable<RelativePath>, CharSequence
Represents a relative path from some base directory to a file. Used in file copying to represent both a source and target file path when copying files.
RelativePath
instances are immutable.
RelativePath(endsWithFile: Boolean, vararg segments: String)
Creates a |
static val EMPTY_ROOT: RelativePath |
|
open val length: Int |
open fun append(other: RelativePath): RelativePath
Appends the given path to the end of this path. open fun append(endsWithFile: Boolean, vararg segments: String): RelativePath
Appends the given names to the end of this path. |
|
open fun compareTo(other: RelativePath): Int |
|
open fun equals(other: Any?): Boolean |
|
open fun get(index: Int): Char |
|
open fun getFile(baseDir: File): File |
|
open fun getLastName(): String |
|
open fun getParent(): RelativePath
Returns the parent of this path. |
|
open fun getPathString(): String |
|
open fun getSegments(): Array<String> |
|
open fun hashCode(): Int |
|
open fun isFile(): Boolean |
|
open static fun parse(isFile: Boolean, path: String): RelativePath open static fun parse(isFile: Boolean, parent: RelativePath, path: String): RelativePath |
|
open fun plus(other: RelativePath): RelativePath
Appends the given path to the end of this path. |
|
open fun prepend(vararg segments: String): RelativePath
Prepends the given names to the start of this path. |
|
open fun replaceLastName(name: String): RelativePath
Returns a copy of this path, with the last name replaced with the given name. |
|
open fun segmentIterator(): MutableListIterator<String> |
|
open fun subSequence(startIndex: Int, endIndex: Int): CharSequence |
|
open fun toString(): String |