RelativePath

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.

Constructors

Link copied to clipboard
constructor(endsWithFile: Boolean, segments: Array<String>)
Creates a RelativePath.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun append(other: RelativePath): RelativePath
Appends the given path to the end of this path.
open fun append(endsWithFile: Boolean, segments: Array<String>): RelativePath
Appends the given names to the end of this path.
Link copied to clipboard
open fun charAt(index: Int): Char
Link copied to clipboard
open fun chars(): IntStream
Link copied to clipboard
open fun codePoints(): IntStream
Link copied to clipboard
open fun compare(cs1: CharSequence, cs2: CharSequence): Int
Link copied to clipboard
open fun compareTo(o: RelativePath): Int
Link copied to clipboard
open fun equals(o: Any): Boolean
Link copied to clipboard
open fun getFile(baseDir: File): File
Link copied to clipboard
open fun getLastName(): String
Link copied to clipboard
Returns the parent of this path.
Link copied to clipboard
open fun getPathString(): String
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isFile(): Boolean
Link copied to clipboard
open fun length(): Int
Link copied to clipboard
open fun parse(isFile: Boolean, path: String): RelativePath
open fun parse(isFile: Boolean, @Nullable parent: RelativePath, path: String): RelativePath
Link copied to clipboard
open fun plus(other: RelativePath): RelativePath
Appends the given path to the end of this path.
Link copied to clipboard
open fun prepend(segments: Array<String>): RelativePath
Prepends the given names to the start of this path.
Link copied to clipboard
Returns a copy of this path, with the last name replaced with the given name.
Link copied to clipboard
Link copied to clipboard
open fun subSequence(start: Int, end: Int): CharSequence
Link copied to clipboard
open fun toString(): String