ludic/ns-path.html
2026-09-17 22:10:03 +00:00

24 lines
No EOL
3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Path — Ludic</title>
<meta name="description" content="Path manipulation as pure string operations — no disk access, no allocation surprises, just the joining and splitting every save system, mod loader, and asset…">
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="docs.css">
</head>
<body>
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
<main class="wrap item">
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Path</span></div>
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Path</h1></div>
<p class="ns-blurb">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 <code>.</code>/<code>..</code>/duplicate slashes into a canonical form.
Paths use <code>/</code> as the separator, matching the native (macOS/BSD) filesystem — the fully supported target today; Windows-style separators are a follow-up. Pair these with <a href="ns-Os"><code>Os</code></a> (which supplies per-user directory *locations*) and <a href="ns-Fs"><code>Fs</code></a> (which does the actual reading and writing).</p>
<div class="ns-methods"><a class="ns-method" href="path-join.html"><code class="nm-sig">Path.join(a, b) -&gt; string</code><span class="nm-tip">Join two path segments with the separator.</span></a><a class="ns-method" href="path-dir.html"><code class="nm-sig">Path.dir(p) -&gt; string</code><span class="nm-tip">The directory part of a path.</span></a><a class="ns-method" href="path-base.html"><code class="nm-sig">Path.base(p) -&gt; string</code><span class="nm-tip">The final component of a path.</span></a><a class="ns-method" href="path-ext.html"><code class="nm-sig">Path.ext(p) -&gt; string</code><span class="nm-tip">The file extension, including the dot.</span></a><a class="ns-method" href="path-stem.html"><code class="nm-sig">Path.stem(p) -&gt; string</code><span class="nm-tip">The final component without its extension.</span></a><a class="ns-method" href="path-normalize.html"><code class="nm-sig">Path.normalize(p) -&gt; string</code><span class="nm-tip">Collapse . / .. / duplicate separators.</span></a></div>
<a class="back" href="api.html">← All symbols</a>
</main>
<script src="ludic-highlight.js"></script>
<script>Ludic.installCards(); Ludic.flashTarget();</script>
</body></html>