gradle
8.3

# Path

open class Path : Comparable<T>

Represents a path in Gradle.

## Functions

absolutePath
Link copied to clipboard
open fun absolutePath(path: String): String
Resolves the given name relative to this path.
open fun absolutePath(path: Path): Path
append
Link copied to clipboard
open fun append(path: Path): Path
Appends the supplied path to this path, returning the new path.
child
Link copied to clipboard
open fun child(name: String): Path
Creates a child of this path with the given name.
compareTo
Link copied to clipboard
open fun compareTo(other: Path): Int
equals
Link copied to clipboard
open fun equals(@Nullable o: Any): Boolean
getName
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.
getParent
Link copied to clipboard
@Nullable
open fun getParent(): Path
Returns the parent of this path, or null if this path has no parent.
getPath
Link copied to clipboard
open fun getPath(): String
hashCode
Link copied to clipboard
open fun hashCode(): Int
isAbsolute
Link copied to clipboard
open fun isAbsolute(): Boolean
path
Link copied to clipboard
open fun path(@Nullable path: String): Path
relativePath
Link copied to clipboard
open fun relativePath(path: String): String
Calculates a path relative to this path.
open fun relativePath(path: Path): Path
removeFirstSegments
Link copied to clipboard
open fun removeFirstSegments(n: Int): Path
segment
Link copied to clipboard
open fun segment(index: Int): String
segmentCount
Link copied to clipboard
open fun segmentCount(): Int
toString
Link copied to clipboard
open fun toString(): String

## Properties

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