API Reference › Path
namespace

Path

Path manipulation as pure string operations — no disk access, no allocation surprises, just the joining and splitting every save system, mod loader, and asset pipeline needs. Separate a filename from its folder, get an extension, join segments without worrying about doubled or missing separators, and collapse ./../duplicate slashes into a canonical form. Paths use / as the separator, matching the native (macOS/BSD) filesystem — the fully supported target today; Windows-style separators are a follow-up. Pair these with Os (which supplies per-user directory *locations*) and Fs (which does the actual reading and writing).

Path.join(a, b) -> stringJoin two path segments with the separator.Path.dir(p) -> stringThe directory part of a path.Path.base(p) -> stringThe final component of a path.Path.ext(p) -> stringThe file extension, including the dot.Path.stem(p) -> stringThe final component without its extension.Path.normalize(p) -> stringCollapse . / .. / duplicate separators.
← All symbols