Scoop API

scoop:scoop.platform:0.1.0

Path

class Path

source · line 12
public
public class Path private constructor(private val bytes: Array<Byte>) : Equals<Path>, Hash

An immutable native byte path with no embedded NUL. Lexical operations do not access the filesystem or resolve symbolic links; equality compares stored bytes.

Extensions

function decodeUtf8

source · line 181
public
public fun decodeUtf8(): String

Decodes the stored bytes as strict UTF-8, rejecting malformed encoding.

function components

source · line 69
public
public fun components(): Array<OsString>

Returns nonempty components after the target's native path prefix and root.

function hash

source · line 198
public
public override fun hash(): Long

Hashes the stored bytes consistently with equality.

function resolve

source · line 93
public
public fun resolve(child: Path): Path

Joins a relative child to this path. A prefixed or absolute child replaces the base; a Windows rooted child retains the base's prefix.

function decodeUtf8Lossy

source · line 185
public
public fun decodeUtf8Lossy(): String

Decodes stored bytes with replacement for malformed UTF-8.

function normalizeLexically

source · line 134
public
public fun normalizeLexically(): Path

Removes redundant separators and dot components and folds lexical dot-dot pairs. It does not follow links or guarantee equivalence through symbolic links.

function toOsString

source · line 177
public
public fun toOsString(): OsString

Copies the stored path bytes into an operating-system string.

function display

source · line 189
public
public fun display(): String

Returns a lossy UTF-8 presentation suitable for displaying native names.