update docs

This commit is contained in:
2021-01-19 10:56:58 +01:00
parent 4bf3e1c7c1
commit 03aab46ab5
3 changed files with 26 additions and 36 deletions

View File

@@ -5,7 +5,7 @@ is a simple file path library for Carp.
## Installation
```clojure
(load "https://veitheller.de/git/carpentry/path@0.0.2")
(load "https://veitheller.de/git/carpentry/path@0.0.3")
```
### Usage

View File

@@ -9,8 +9,8 @@
<body>
<div class="content">
<div class="logo">
<a href="http://github.com/carp-lang/Carp">
<img src="logo.png">
<a href="">
<img src="">
</a>
<div class="title">
path
@@ -29,16 +29,7 @@
Path
</h1>
<div class="module-description">
<p>is a simple file path library for Carp.</p>
<h2>Installation</h2>
<pre><code class="language-clojure">(load &quot;https://veitheller.de/git/carpentry/path@0.0.2&quot;)
</code></pre>
<h3>Usage</h3>
<p>The <code>Path</code> module mostly operates on <code>String</code> arguments. It allows you to
split, join, and merge paths and extensions in a lot of different ways. It also
has some functions to work with the <code>PATH</code> environment variable.</p>
<p>It assumes either Windows or POSIX-style separators.</p>
</div>
<div class="binder">
<a class="anchor" href="#&lt;/&gt;">
@@ -50,7 +41,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [a, b] String)
(Fn [a, b] String)
</p>
<pre class="args">
(&lt;/&gt; before after)
@@ -70,14 +61,13 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Maybe String))
(Fn [(Ref String a)] (Maybe String))
</p>
<pre class="args">
(absolute p)
</pre>
<p class="doc">
<p>makes an absolute path from <code>p</code>.</p>
</p>
</div>
<div class="binder">
@@ -90,7 +80,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] Bool)
(Fn [(Ref String a)] Bool)
</p>
<pre class="args">
(absolute? p)
@@ -111,7 +101,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a), (Ref String b)] String)
(Fn [(Ref String a), (Ref String b)] String)
</p>
<pre class="args">
(add-extension p ext)
@@ -131,7 +121,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] String)
(Fn [(Ref String a)] String)
</p>
<pre class="args">
(basename p)
@@ -151,7 +141,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn
</div>
<p class="sig">
(λ [] (Maybe String))
(Fn [] (Maybe String))
</p>
<pre class="args">
(cwd)
@@ -172,7 +162,7 @@ which it can fail are OS-dependent, but it should happen relatively rare.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] String)
(Fn [(Ref String a)] String)
</p>
<pre class="args">
(drop-extension p)
@@ -193,7 +183,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Maybe String))
(Fn [(Ref String a)] (Maybe String))
</p>
<pre class="args">
(extension p)
@@ -213,7 +203,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Maybe String))
(Fn [(Ref String a)] (Maybe String))
</p>
<pre class="args">
(filename p)
@@ -234,7 +224,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [] (Maybe (Array String)))
(Fn [] (Maybe (Array String)))
</p>
<pre class="args">
(get-search-path)
@@ -254,7 +244,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] Bool)
(Fn [(Ref String a)] Bool)
</p>
<pre class="args">
(has-extension? p)
@@ -274,7 +264,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a), (Ref String b)] Bool)
(Fn [(Ref String a), (Ref String b)] Bool)
</p>
<pre class="args">
(is-extension? p ext)
@@ -294,7 +284,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref (Array String) a)] String)
(Fn [(Ref (Array String) a)] String)
</p>
<pre class="args">
(join ps)
@@ -335,7 +325,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] Bool)
(Fn [(Ref String a)] Bool)
</p>
<pre class="args">
(relative? p)
@@ -356,7 +346,7 @@ is none.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a), (Ref String b)] String)
(Fn [(Ref String a), (Ref String b)] String)
</p>
<pre class="args">
(replace-extension p ext)
@@ -398,7 +388,7 @@ variable we use on this OS.</p>
defn
</div>
<p class="sig">
(λ [Char] Bool)
(Fn [Char] Bool)
</p>
<pre class="args">
(search-path-separator? c)
@@ -437,7 +427,7 @@ variable we use on this OS.</p>
defn
</div>
<p class="sig">
(λ [(Ref Char StaticLifetime)] Bool)
(Fn [(Ref Char StaticLifetime)] Bool)
</p>
<pre class="args">
(separator? c)
@@ -478,7 +468,7 @@ variable we use on this OS.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Array String))
(Fn [(Ref String a)] (Array String))
</p>
<pre class="args">
(split p)
@@ -499,7 +489,7 @@ variable we use on this OS.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Maybe (Pair String String)))
(Fn [(Ref String a)] (Maybe (Pair String String)))
</p>
<pre class="args">
(split-extension p)
@@ -536,7 +526,7 @@ the extension.</p>
defn
</div>
<p class="sig">
(λ [(Ref String a)] (Array String))
(Fn [(Ref String a)] (Array String))
</p>
<pre class="args">
(split-search-path p)

View File

@@ -3,7 +3,7 @@
## Installation
```clojure
(load \"https://veitheller.de/git/carpentry/path@0.0.2\")
(load \"https://veitheller.de/git/carpentry/path@0.0.3\")
```
### Usage