- <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":support-fs:dokkaHtmlPartial/main"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">fun </span><a href="normalize-path.html"><span class="token function">normalizePath</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">path<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Returns the <a href="normalize-path.html">path</a> as a "normalized" version:</p><ul><li><p class="paragraph">If the <a href="normalize-path.html">path</a> starts with <code class="lang-kotlin">./</code>, replace <code class="lang-kotlin">./</code> with <a href="../-filesystem-storage-config/directory.html">config.directory</a></p></li><li><p class="paragraph">If the <a href="normalize-path.html">path</a> starts with <code class="lang-kotlin">~/</code>, replace <code class="lang-kotlin">~/</code> with system property <code class="lang-kotlin">user.home</code> (or <code class="lang-kotlin">/</code> by default)</p></li><li><p class="paragraph">If the clauses both fail, do not do anything with the path.</p></li></ul><div class="block"></div><h4 class="">Return</h4><p class="paragraph">The normalized path.</p><h2 class="">Parameters</h2><div data-togglable="Parameters"><div class="table" data-togglable="Parameters"><div class="table-row" data-filterable-current=":support-fs:dokkaHtmlPartial/main" data-filterable-set=":support-fs:dokkaHtmlPartial/main"><div class="main-subrow keyValue WithExtraAttributes"><div class=""><span class="inline-flex"><div><span><span>path</span></span></div></span></div><div><div class="title"><div data-togglable="Parameters"><p class="paragraph">The path to normalize</p></div></div></div></div></div></div></div></div></div>
0 commit comments