Path

open class Path : Comparable<T> (source)

Represents a path in Gradle.

Properties

Link copied to clipboard
val ROOT: Path
Link copied to clipboard
val SEPARATOR: String = ":"

Functions

Link copied to clipboard
open fun absolutePath(path: String): String
Resolves the given name relative to this path.
open fun absolutePath(path: Path): Path
Link copied to clipboard
Iterate over all ancestors of this path, starting with the root path (if absolute) or the first segment (if relative) and not including this path.
Link copied to clipboard
open fun append(path: Path): Path
Appends the supplied path to this path, returning the new path.
Link copied to clipboard
open fun child(name: String): Path
Creates a child of this path with the given name.
Link copied to clipboard
open fun compareTo(other: Path): Int
Link copied to clipboard
open fun equals(@Nullable o: Any): Boolean
Link copied to clipboard
@Nullable
open fun getName(): String
Returns the base name of this path, or null if this path is the root path.
Link copied to clipboard
@Nullable
open fun getParent(): Path
Returns the parent of this path, or null if this path has no parent.
Link copied to clipboard
open fun getPath(): String
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun isAbsolute(): Boolean
Link copied to clipboard
open fun path(@Nullable path: String): Path
Link copied to clipboard
open fun relativePath(path: String): String
Calculates a path relative to this path.
open fun relativePath(path: Path): Path
Link copied to clipboard
Link copied to clipboard
open fun segment(index: Int): String
Link copied to clipboard
open fun segmentCount(): Int
Link copied to clipboard
returns an immutable list of the segments of this path
Link copied to clipboard
Returns a Path containing only the first n segments of this Path.
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun validatePath(@Nullable path: String)
throws if no path is specified