123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>std/paths</title>
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">std/paths</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
-
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#Path" title="Path = distinct string">Path</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">/
- <li><a class="reference" href="#%2F%2CPath%2CPath" title="`/`(head, tail: Path): Path">`/`(head, tail: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">/../
- <li><a class="reference" href="#%2F..%2F%2CPath%2CPath" title="`/../`(head, tail: Path): Path">`/../`(head, tail: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">==
- <li><a class="reference" href="#%3D%3D%2CPath%2CPath" title="`==`(x, y: Path): bool">`==`(x, y: Path): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">absolutePath
- <li><a class="reference" href="#absolutePath%2CPath" title="absolutePath(path: Path; root = getCurrentDir()): Path">absolutePath(path: Path; root = getCurrentDir()): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">add
- <li><a class="reference" href="#add%2CPath%2CPath" title="add(x: var Path; y: Path)">add(x: var Path; y: Path)</a></li>
- </ul>
- <ul class="simple nested-toc-section">addFileExt
- <li><a class="reference" href="#addFileExt%2CPath%2Cstring" title="addFileExt(filename: Path; ext: string): Path">addFileExt(filename: Path; ext: string): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">changeFileExt
- <li><a class="reference" href="#changeFileExt%2CPath%2Cstring" title="changeFileExt(filename: Path; ext: string): Path">changeFileExt(filename: Path; ext: string): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">expandTilde
- <li><a class="reference" href="#expandTilde%2CPath" title="expandTilde(path: Path): Path">expandTilde(path: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">extractFilename
- <li><a class="reference" href="#extractFilename%2CPath" title="extractFilename(path: Path): Path">extractFilename(path: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">getCurrentDir
- <li><a class="reference" href="#getCurrentDir" title="getCurrentDir(): Path">getCurrentDir(): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">hash
- <li><a class="reference" href="#hash%2CPath" title="hash(x: Path): Hash">hash(x: Path): Hash</a></li>
- </ul>
- <ul class="simple nested-toc-section">isAbsolute
- <li><a class="reference" href="#isAbsolute%2CPath" title="isAbsolute(path: Path): bool">isAbsolute(path: Path): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">isRelativeTo
- <li><a class="reference" href="#isRelativeTo%2CPath%2CPath" title="isRelativeTo(path: Path; base: Path): bool">isRelativeTo(path: Path; base: Path): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">isRootDir
- <li><a class="reference" href="#isRootDir%2CPath" title="isRootDir(path: Path): bool">isRootDir(path: Path): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">lastPathPart
- <li><a class="reference" href="#lastPathPart%2CPath" title="lastPathPart(path: Path): Path">lastPathPart(path: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">normalizeExe
- <li><a class="reference" href="#normalizeExe%2CPath" title="normalizeExe(file: var Path)">normalizeExe(file: var Path)</a></li>
- </ul>
- <ul class="simple nested-toc-section">normalizePath
- <li><a class="reference" href="#normalizePath%2CPath" title="normalizePath(path: var Path)">normalizePath(path: var Path)</a></li>
- </ul>
- <ul class="simple nested-toc-section">normalizePathEnd
- <li><a class="reference" href="#normalizePathEnd%2CPath" title="normalizePathEnd(path: var Path; trailingSep = false)">normalizePathEnd(path: var Path; trailingSep = false)</a></li>
- </ul>
- <ul class="simple nested-toc-section">parentDir
- <li><a class="reference" href="#parentDir%2CPath" title="parentDir(path: Path): Path">parentDir(path: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">relativePath
- <li><a class="reference" href="#relativePath%2CPath%2CPath" title="relativePath(path, base: Path; sep = DirSep): Path">relativePath(path, base: Path; sep = DirSep): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">splitFile
- <li><a class="reference" href="#splitFile%2CPath" title="splitFile(path: Path): tuple[dir, name: Path, ext: string]">splitFile(path: Path): tuple[dir, name: Path, ext: string]</a></li>
- </ul>
- <ul class="simple nested-toc-section">splitPath
- <li><a class="reference" href="#splitPath%2CPath" title="splitPath(path: Path): tuple[head, tail: Path]">splitPath(path: Path): tuple[head, tail: Path]</a></li>
- </ul>
- <ul class="simple nested-toc-section">tailDir
- <li><a class="reference" href="#tailDir%2CPath" title="tailDir(path: Path): Path">tailDir(path: Path): Path</a></li>
- </ul>
- <ul class="simple nested-toc-section">unixToNativePath
- <li><a class="reference" href="#unixToNativePath%2CPath" title="unixToNativePath(path: Path; drive = Path("")): Path">unixToNativePath(path: Path; drive = Path("")): Path</a></li>
- </ul>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#15" id="65">Iterators</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">parentDirs
- <li><a class="reference" href="#parentDirs.i%2CPath" title="parentDirs(path: Path; fromRoot = false; inclusive = true): Path">parentDirs(path: Path; fromRoot = false; inclusive = true): Path</a></li>
- </ul>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#18" id="68">Templates</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">$
- <li><a class="reference" href="#%24.t%2CPath" title="`$`(x: Path): string">`$`(x: Path): string</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc"><p>This module implements path handling.</p>
- <p><strong>See also:</strong></p>
- <ul class="simple"><li><a class="reference external" href="files.html">files module</a> for file access</li>
- </ul>
- </p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="osseps.html">osseps</a>, <a class="reference external" href="envvars.html">envvars</a>, <a class="reference external" href="osappdirs.html">osappdirs</a>, <a class="reference external" href="pathnorm.html">pathnorm</a>, <a class="reference external" href="hashes.html">hashes</a>, <a class="reference external" href="sugar.html">sugar</a>, <a class="reference external" href="strutils.html">strutils</a>, <a class="reference external" href="ospaths2.html">ospaths2</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="Path">
- <dt><pre><a href="paths.html#Path"><span class="Identifier">Path</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <a href="system.html#string"><span class="Identifier">string</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L26" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L26" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="/-procs-all">
- <div id="/,Path,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#%2F%2CPath%2CPath"><span class="Identifier">`/`</span></a><span class="Other">(</span><span class="Identifier">head</span><span class="Other">,</span> <span class="Identifier">tail</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Joins two directory names to one.</p>
- <p>returns normalized path concatenation of <tt class="docutils literal"><span class="pre"><span class="Identifier">head</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">tail</span></span></tt>, preserving whether or not <tt class="docutils literal"><span class="pre"><span class="Identifier">tail</span></span></tt> has a trailing slash (or, if tail if empty, whether head has one).</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitPath(path: Path): tuple[head, tail: Path]" href="#splitPath,Path">splitPath proc</a></li>
- <li><a class="reference external" href="uri.html#combine,Uri,Uri">uri.combine proc</a></li>
- <li><a class="reference external" href="uri.html#/,Uri,string">uri./ proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L57" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L57" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="/../-procs-all">
- <div id="/../,Path,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#%2F..%2F%2CPath%2CPath"><span class="Identifier">`/../`</span></a><span class="Other">(</span><span class="Identifier">head</span><span class="Other">,</span> <span class="Identifier">tail</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>The same as <tt class="docutils literal"><span class="pre">parentDir(head) / tail</span></tt>, unless there is no parent directory. Then <tt class="docutils literal"><span class="pre">head / tail</span></tt> is performed instead.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc `/`(head, tail: Path): Path" href="#/,Path,Path">/ proc</a></li>
- <li><a class="reference internal nimdoc" title="proc parentDir(path: Path): Path" href="#parentDir,Path">parentDir proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L172" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L172" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="==-procs-all">
- <div id="==,Path,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#%3D%3D%2CPath%2CPath"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Compares two paths.</p>
- <p>On a case-sensitive filesystem this is done case-sensitively otherwise case-insensitively.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L38" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L38" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="absolutePath-procs-all">
- <div id="absolutePath,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#absolutePath%2CPath"><span class="Identifier">absolutePath</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">root</span> <span class="Other">=</span> <span class="Identifier">getCurrentDir</span><span class="Other">(</span><span class="Other">)</span><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Returns the absolute path of <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt>, rooted at <tt class="docutils literal"><span class="pre"><span class="Identifier">root</span></span></tt> (which must be absolute; default: current directory). If <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> is absolute, return it, ignoring <tt class="docutils literal"><span class="pre"><span class="Identifier">root</span></span></tt>.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc normalizePath(path: var Path)" href="#normalizePath,Path">normalizePath proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L269" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L269" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="add-procs-all">
- <div id="add,Path,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#add%2CPath%2CPath"><span class="Identifier">add</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L55" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L55" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="addFileExt-procs-all">
- <div id="addFileExt,Path,string">
- <dt><pre><span class="Keyword">func</span> <a href="#addFileExt%2CPath%2Cstring"><span class="Identifier">addFileExt</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">ext</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Adds the file extension <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">filename</span></span></tt>, unless <tt class="docutils literal"><span class="pre"><span class="Identifier">filename</span></span></tt> already has an extension.</p>
- <p><tt class="docutils literal"><span class="pre"><span class="Identifier">Ext</span></span></tt> should be given without the leading <tt class="docutils literal"><span class="pre"><span class="CharLit">'.'</span></span></tt>, because some filesystems may use a different character. (Although I know of none such beast.)</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitFile(path: Path): tuple[dir, name: Path, ext: string]" href="#splitFile,Path">splitFile proc</a></li>
- <li><a class="reference internal nimdoc" title="proc extractFilename(path: Path): Path" href="#extractFilename,Path">extractFilename proc</a></li>
- <li><a class="reference internal nimdoc" title="proc lastPathPart(path: Path): Path" href="#lastPathPart,Path">lastPathPart proc</a></li>
- <li><a class="reference internal nimdoc" title="proc changeFileExt(filename: Path; ext: string): Path" href="#changeFileExt,Path,string">changeFileExt proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L221" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L221" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="changeFileExt-procs-all">
- <div id="changeFileExt,Path,string">
- <dt><pre><span class="Keyword">func</span> <a href="#changeFileExt%2CPath%2Cstring"><span class="Identifier">changeFileExt</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">ext</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Changes the file extension to <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt>.</p>
- <p>If the <tt class="docutils literal"><span class="pre"><span class="Identifier">filename</span></span></tt> has no extension, <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt> will be added. If <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt> == "" then any extension is removed.</p>
- <p><tt class="docutils literal"><span class="pre"><span class="Identifier">Ext</span></span></tt> should be given without the leading <tt class="docutils literal"><span class="pre"><span class="CharLit">'.'</span></span></tt>, because some filesystems may use a different character. (Although I know of none such beast.)</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitFile(path: Path): tuple[dir, name: Path, ext: string]" href="#splitFile,Path">splitFile proc</a></li>
- <li><a class="reference internal nimdoc" title="proc extractFilename(path: Path): Path" href="#extractFilename,Path">extractFilename proc</a></li>
- <li><a class="reference internal nimdoc" title="proc lastPathPart(path: Path): Path" href="#lastPathPart,Path">lastPathPart proc</a></li>
- <li><a class="reference internal nimdoc" title="proc addFileExt(filename: Path; ext: string): Path" href="#addFileExt,Path,string">addFileExt proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L204" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L204" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="expandTilde-procs-all">
- <div id="expandTilde,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#expandTilde%2CPath"><span class="Identifier">expandTilde</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><a href="envvars.html#ReadEnvEffect"><span class="Identifier">ReadEnvEffect</span></a><span class="Other">,</span> <a href="exceptions.html#ReadIOEffect"><span class="Identifier">ReadIOEffect</span></a><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Expands <tt class="docutils literal"><span class="pre">~</span></tt> or a path starting with <tt class="docutils literal"><span class="pre">~/</span></tt> to a full path, replacing <tt class="docutils literal"><span class="pre">~</span></tt> with <a class="reference external" href="appdirs.html#getHomeDir">getHomeDir()</a> (otherwise returns <tt class="docutils literal"><span class="pre">path</span></tt> unmodified).</p>
- <p>Windows: this is still supported despite the Windows platform not having this convention; also, both <tt class="docutils literal"><span class="pre">~/</span></tt> and <tt class="docutils literal"><span class="pre">~\</span></tt> are handled.</p>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">appdirs</span>
- <span class="Identifier">assert</span> <span class="Identifier">expandTilde</span><span class="Punctuation">(</span><span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"~"</span><span class="Punctuation">)</span> <span class="Operator">/</span> <span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"appname.cfg"</span><span class="Punctuation">)</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="Identifier">getHomeDir</span><span class="Punctuation">(</span><span class="Punctuation">)</span> <span class="Operator">/</span> <span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"appname.cfg"</span><span class="Punctuation">)</span>
- <span class="Identifier">assert</span> <span class="Identifier">expandTilde</span><span class="Punctuation">(</span><span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"~/foo/bar"</span><span class="Punctuation">)</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="Identifier">getHomeDir</span><span class="Punctuation">(</span><span class="Punctuation">)</span> <span class="Operator">/</span> <span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"foo/bar"</span><span class="Punctuation">)</span>
- <span class="Identifier">assert</span> <span class="Identifier">expandTilde</span><span class="Punctuation">(</span><span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"/foo/bar"</span><span class="Punctuation">)</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="Identifier">Path</span><span class="Punctuation">(</span><span class="StringLit">"/foo/bar"</span><span class="Punctuation">)</span></pre>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L290" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L290" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="extractFilename-procs-all">
- <div id="extractFilename,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#extractFilename%2CPath"><span class="Identifier">extractFilename</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Extracts the filename of a given <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt>.</p>
- <p>This is the same as <tt class="docutils literal"><span class="pre">name & ext</span></tt> from <a class="reference internal nimdoc" title="proc splitFile(path: Path): tuple[dir, name: Path, ext: string]" href="#splitFile,Path">splitFile(path) proc</a>.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitFile(path: Path): tuple[dir, name: Path, ext: string]" href="#splitFile,Path">splitFile proc</a></li>
- <li><a class="reference internal nimdoc" title="proc lastPathPart(path: Path): Path" href="#lastPathPart,Path">lastPathPart proc</a></li>
- <li><a class="reference internal nimdoc" title="proc changeFileExt(filename: Path; ext: string): Path" href="#changeFileExt,Path,string">changeFileExt proc</a></li>
- <li><a class="reference internal nimdoc" title="proc addFileExt(filename: Path; ext: string): Path" href="#addFileExt,Path,string">addFileExt proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L181" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L181" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getCurrentDir-procs-all">
- <div id="getCurrentDir">
- <dt><pre><span class="Keyword">proc</span> <a href="#getCurrentDir"><span class="Identifier">getCurrentDir</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">OSError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Returns the <span id="current-working-directory_1">current working directory</span> i.e. where the built binary is run.</p>
- <p>So the path returned by this proc is determined at run time.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference external" href="appdirs.html#getHomeDir">getHomeDir proc</a></li>
- <li><a class="reference external" href="appdirs.html#getConfigDir">getConfigDir proc</a></li>
- <li><a class="reference external" href="appdirs.html#getTempDir">getTempDir proc</a></li>
- <li><a class="reference external" href="dirs.html#setCurrentDir">setCurrentDir proc</a></li>
- <li><a class="reference external" href="system.html#currentSourcePath.t">currentSourcePath template</a></li>
- <li><a class="reference external" href="macros.html#getProjectPath">getProjectPath proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L248" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L248" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="hash-procs-all">
- <div id="hash,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#hash%2CPath"><span class="Identifier">hash</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="hashes.html#Hash"><span class="Identifier">Hash</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L28" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L28" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="isAbsolute-procs-all">
- <div id="isAbsolute,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#isAbsolute%2CPath"><span class="Identifier">isAbsolute</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Checks whether a given <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> is absolute.</p>
- <p>On Windows, network paths are considered absolute too.</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L100" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L100" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="isRelativeTo-procs-all">
- <div id="isRelativeTo,Path,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#isRelativeTo%2CPath%2CPath"><span class="Identifier">isRelativeTo</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">base</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Returns true if <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> is relative to <tt class="docutils literal"><span class="pre"><span class="Identifier">base</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L123" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L123" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="isRootDir-procs-all">
- <div id="isRootDir,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#isRootDir%2CPath"><span class="Identifier">isRootDir</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- Checks whether a given <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> is a root directory.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L151" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L151" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="lastPathPart-procs-all">
- <div id="lastPathPart,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#lastPathPart%2CPath"><span class="Identifier">lastPathPart</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Like <a class="reference internal nimdoc" title="proc extractFilename(path: Path): Path" href="#extractFilename,Path">extractFilename proc</a>, but ignores trailing dir separator; aka: <span id="basename_1">baseName</span> in some other languages.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitFile(path: Path): tuple[dir, name: Path, ext: string]" href="#splitFile,Path">splitFile proc</a></li>
- <li><a class="reference internal nimdoc" title="proc extractFilename(path: Path): Path" href="#extractFilename,Path">extractFilename proc</a></li>
- <li><a class="reference internal nimdoc" title="proc changeFileExt(filename: Path; ext: string): Path" href="#changeFileExt,Path,string">changeFileExt proc</a></li>
- <li><a class="reference internal nimdoc" title="proc addFileExt(filename: Path; ext: string): Path" href="#addFileExt,Path,string">addFileExt proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L193" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L193" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="normalizeExe-procs-all">
- <div id="normalizeExe,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#normalizeExe%2CPath"><span class="Identifier">normalizeExe</span></a><span class="Other">(</span><span class="Identifier">file</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L263" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L263" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="normalizePath-procs-all">
- <div id="normalizePath,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#normalizePath%2CPath"><span class="Identifier">normalizePath</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L265" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L265" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="normalizePathEnd-procs-all">
- <div id="normalizePathEnd,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#normalizePathEnd%2CPath"><span class="Identifier">normalizePathEnd</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">trailingSep</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L267" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L267" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="parentDir-procs-all">
- <div id="parentDir,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#parentDir%2CPath"><span class="Identifier">parentDir</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Returns the parent directory of <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt>.</p>
- <p>This is similar to <tt class="docutils literal"><span class="pre">splitPath(path).head</span></tt> when <tt class="docutils literal"><span class="pre">path</span></tt> doesn't end in a dir separator, but also takes care of path normalizations. The remainder can be obtained with <a class="reference internal nimdoc" title="proc lastPathPart(path: Path): Path" href="#lastPathPart,Path">lastPathPart(path) proc</a>.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc relativePath(path, base: Path; sep = DirSep): Path" href="#relativePath,Path,Path">relativePath proc</a></li>
- <li><a class="reference internal nimdoc" title="proc splitPath(path: Path): tuple[head, tail: Path]" href="#splitPath,Path">splitPath proc</a></li>
- <li><a class="reference internal nimdoc" title="proc tailDir(path: Path): Path" href="#tailDir,Path">tailDir proc</a></li>
- <li><a class="reference internal nimdoc" title="iterator parentDirs(path: Path; fromRoot = false; inclusive = true): Path" href="#parentDirs.i,Path">parentDirs iterator</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L128" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L128" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="relativePath-procs-all">
- <div id="relativePath,Path,Path">
- <dt><pre><span class="Keyword">proc</span> <a href="#relativePath%2CPath%2CPath"><span class="Identifier">relativePath</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">,</span> <span class="Identifier">base</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">sep</span> <span class="Other">=</span> <span class="Identifier">DirSep</span><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Converts <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> to a path relative to <tt class="docutils literal"><span class="pre"><span class="Identifier">base</span></span></tt>.</p>
- <p>The <tt class="docutils literal"><span class="pre"><span class="Identifier">sep</span></span></tt> (default: DirSep) is used for the path normalizations, this can be useful to ensure the relative path only contains <tt class="docutils literal"><span class="pre"><span class="CharLit">'/'</span></span></tt> so that it can be used for URL constructions.</p>
- <p>On Windows, if a root of <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> and a root of <tt class="docutils literal"><span class="pre"><span class="Identifier">base</span></span></tt> are different, returns <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> as is because it is impossible to make a relative path. That means an absolute path can be returned.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc splitPath(path: Path): tuple[head, tail: Path]" href="#splitPath,Path">splitPath proc</a></li>
- <li><a class="reference internal nimdoc" title="proc parentDir(path: Path): Path" href="#parentDir,Path">parentDir proc</a></li>
- <li><a class="reference internal nimdoc" title="proc tailDir(path: Path): Path" href="#tailDir,Path">tailDir proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L106" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L106" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="splitFile-procs-all">
- <div id="splitFile,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#splitFile%2CPath"><span class="Identifier">splitFile</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">dir</span><span class="Other">,</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">,</span> <span class="Identifier">ext</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">]</span> {.<span class="Identifier">inline</span><span class="Other">,</span>
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Splits a filename into <tt class="docutils literal"><span class="pre"><span class="Punctuation">(</span><span class="Identifier">dir</span><span class="Punctuation">,</span> <span class="Identifier">name</span><span class="Punctuation">,</span> <span class="Identifier">extension</span><span class="Punctuation">)</span></span></tt> tuple.</p>
- <p><tt class="docutils literal"><span class="pre"><span class="Identifier">dir</span></span></tt> does not end in DirSep unless it's <tt class="docutils literal"><span class="pre"><span class="Operator">/</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">extension</span></span></tt> includes the leading dot.</p>
- <p>If <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> has no extension, <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt> is the empty string. If <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> has no directory component, <tt class="docutils literal"><span class="pre"><span class="Identifier">dir</span></span></tt> is the empty string. If <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt> has no filename component, <tt class="docutils literal"><span class="pre"><span class="Identifier">name</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">ext</span></span></tt> are empty strings.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc extractFilename(path: Path): Path" href="#extractFilename,Path">extractFilename proc</a></li>
- <li><a class="reference internal nimdoc" title="proc lastPathPart(path: Path): Path" href="#lastPathPart,Path">lastPathPart proc</a></li>
- <li><a class="reference internal nimdoc" title="proc changeFileExt(filename: Path; ext: string): Path" href="#changeFileExt,Path,string">changeFileExt proc</a></li>
- <li><a class="reference internal nimdoc" title="proc addFileExt(filename: Path; ext: string): Path" href="#addFileExt,Path,string">addFileExt proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L82" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L82" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="splitPath-procs-all">
- <div id="splitPath,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#splitPath%2CPath"><span class="Identifier">splitPath</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">head</span><span class="Other">,</span> <span class="Identifier">tail</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">]</span> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Splits a directory into <tt class="docutils literal"><span class="pre"><span class="Punctuation">(</span><span class="Identifier">head</span><span class="Punctuation">,</span> <span class="Identifier">tail</span><span class="Punctuation">)</span></span></tt> tuple, so that <tt class="docutils literal"><span class="pre">head / tail == path</span></tt> (except for edge cases like "/usr").</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc add(x: var Path; y: Path)" href="#add,Path,Path">add proc</a></li>
- <li><a class="reference internal nimdoc" title="proc `/`(head, tail: Path): Path" href="#/,Path,Path">/ proc</a></li>
- <li><a class="reference internal nimdoc" title="proc `/../`(head, tail: Path): Path" href="#/../,Path,Path">/../ proc</a></li>
- <li><a class="reference internal nimdoc" title="proc relativePath(path, base: Path; sep = DirSep): Path" href="#relativePath,Path,Path">relativePath proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L70" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L70" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="tailDir-procs-all">
- <div id="tailDir,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#tailDir%2CPath"><span class="Identifier">tailDir</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Returns the tail part of <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt>.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc relativePath(path, base: Path; sep = DirSep): Path" href="#relativePath,Path,Path">relativePath proc</a></li>
- <li><a class="reference internal nimdoc" title="proc splitPath(path: Path): tuple[head, tail: Path]" href="#splitPath,Path">splitPath proc</a></li>
- <li><a class="reference internal nimdoc" title="proc parentDir(path: Path): Path" href="#parentDir,Path">parentDir proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L142" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L142" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="unixToNativePath-procs-all">
- <div id="unixToNativePath,Path">
- <dt><pre><span class="Keyword">func</span> <a href="#unixToNativePath%2CPath"><span class="Identifier">unixToNativePath</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">drive</span> <span class="Other">=</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">(</span><span class="StringLit">""</span><span class="Other">)</span><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.<span class="Identifier">inline</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Converts an UNIX-like path to a native one.</p>
- <p>On an UNIX system this does nothing. Else it converts <tt class="docutils literal"><span class="pre"><span class="CharLit">'/'</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="CharLit">'.'</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="CharLit">'..'</span></span></tt> to the appropriate things.</p>
- <p>On systems with a concept of "drives", <tt class="docutils literal"><span class="pre"><span class="Identifier">drive</span></span></tt> is used to determine which drive label to use during absolute path conversion. <tt class="docutils literal"><span class="pre"><span class="Identifier">drive</span></span></tt> defaults to the drive of the current working directory, and is ignored on systems that do not have a concept of "drives".</p>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L236" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L236" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- <div class="section" id="15">
- <h1><a class="toc-backref" href="#15">Iterators</a></h1>
- <dl class="item">
- <div id="parentDirs-iterators-all">
- <div id="parentDirs.i,Path">
- <dt><pre><span class="Keyword">iterator</span> <a href="#parentDirs.i%2CPath"><span class="Identifier">parentDirs</span></a><span class="Other">(</span><span class="Identifier">path</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">;</span> <span class="Identifier">fromRoot</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">;</span> <span class="Identifier">inclusive</span> <span class="Other">=</span> <span class="Identifier">true</span><span class="Other">)</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a> {.
- <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
-
- <p>Walks over all parent directories of a given <tt class="docutils literal"><span class="pre"><span class="Identifier">path</span></span></tt>.</p>
- <p>If <tt class="docutils literal"><span class="pre"><span class="Identifier">fromRoot</span></span></tt> is true (default: false), the traversal will start from the file system root directory. If <tt class="docutils literal"><span class="pre"><span class="Identifier">inclusive</span></span></tt> is true (default), the original argument will be included in the traversal.</p>
- <p>Relative paths won't be expanded by this iterator. Instead, it will traverse only the directories appearing in the relative path.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference internal nimdoc" title="proc parentDir(path: Path): Path" href="#parentDir,Path">parentDir proc</a></li>
- </ul>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L155" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L155" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- <div class="section" id="18">
- <h1><a class="toc-backref" href="#18">Templates</a></h1>
- <dl class="item">
- <div id="$-templates-all">
- <div id="$.t,Path">
- <dt><pre><span class="Keyword">template</span> <a href="#%24.t%2CPath"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="paths.html#Path"><span class="Identifier">Path</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a></pre></dt>
- <dd>
-
-
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/std/paths.nim#L35" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/std/paths.nim#L35" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2025-01-09 12:00:28 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|