std.path - ZZ
Pure-ZZ lexical path helpers. No I/O — pure string manipulation, OS-aware separator style. Mirrors std.fs path functions for backward compatibility.
import std.pathPurpose
Section titled “Purpose”std.path resolves, joins, and inspects paths without touching the disk. Separator style follows std.env.os() ("windows" → \, else /). Use for building paths before passing them to std.fs.
Quickstart
Section titled “Quickstart”import std.path
path.join("a", "b.txt") // a/b.txt (+ normalize)path.join_all(["a", "b", "c"]) // a/b/cpath.normalize("a/./b/../c") // a/cpath.basename("a/b.txt") // b.txtpath.dirname("a/b.txt") // apath.is_absolute("/x") // true (also C:\x, \\unc\…)path.extension("a.tar.gz") // gz (no dot)path.join(a, b) normalizes: b wins when absolute — join(dir, "f.txt"), not join(dir, "/f.txt").
API reference
Section titled “API reference”7 entries. Signatures come from the compiler’s own FuncSig table, so they match the runtime exactly; descriptions come from the module guide.
See also
Section titled “See also”std.env— Environment variables and the surrounding host environment.std.args— argv access and the flag parser: booleans, integers, strings and subcommands.std.process— Spawning, waiting on and signalling child processes.std.log— Log levels, sinks and spans for structured logging.std.sys— Infallible machine information: OS, CPU, memory and uptime.std.cell— Shared mutable slots for lock-free hand-off between green threads.
Full index: API reference · Standard library