Path

value class Path(val value: String)(source)

An immutable absolute lexical path, independent of storage and native capabilities.

Constructors

Link copied to clipboard
constructor(value: String)

Properties

Link copied to clipboard
val name: String?
Link copied to clipboard
val parent: Path?
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Path.delete()
Link copied to clipboard
Link copied to clipboard
fun Path.list(maximumEntries: Int = 256): List<Path>
Link copied to clipboard
fun Path.moveTo(destination: Path)
fun Path.moveTo(destination: Path, replaceExisting: Boolean)
Link copied to clipboard

Removes dot components without accessing storage; attempts to ascend above root stay at root.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Path.readBytes(maximumBytes: Int = 65536): ByteArray
Link copied to clipboard
fun Path.readLines(maximumBytes: Int = 65536): List<String>

Reads all lines within the encoded file-size bound; see FileSystem.readLines.

Link copied to clipboard
fun Path.readText(maximumBytes: Int = 65536): String
Link copied to clipboard
fun resolve(relative: String): Path

Combines this explicit base with a relative path without normalizing dot components or accessing storage.

Link copied to clipboard

Optional storage conveniences. Every operation delegates to the explicit FileSystem facade.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
inline fun <R> Path.useLines(maximumLineBytes: Int = 65536, block: (Sequence<String>) -> R): R

Processes a scoped single-pass sequence, closing on every exit; see FileSystem.useLines.

Link copied to clipboard
fun Path.writeBytes(contents: ByteArray)
Link copied to clipboard
fun Path.writeText(contents: String)