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 ## Installation
```clojure ```clojure
(load "https://veitheller.de/git/carpentry/path@0.0.2") (load "https://veitheller.de/git/carpentry/path@0.0.3")
``` ```
### Usage ### Usage

View File

@@ -9,8 +9,8 @@
<body> <body>
<div class="content"> <div class="content">
<div class="logo"> <div class="logo">
<a href="http://github.com/carp-lang/Carp"> <a href="">
<img src="logo.png"> <img src="">
</a> </a>
<div class="title"> <div class="title">
path path
@@ -29,16 +29,7 @@
Path Path
</h1> </h1>
<div class="module-description"> <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>
<div class="binder"> <div class="binder">
<a class="anchor" href="#&lt;/&gt;"> <a class="anchor" href="#&lt;/&gt;">
@@ -50,7 +41,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [a, b] String) (Fn [a, b] String)
</p> </p>
<pre class="args"> <pre class="args">
(&lt;/&gt; before after) (&lt;/&gt; before after)
@@ -70,14 +61,13 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Maybe String)) (Fn [(Ref String a)] (Maybe String))
</p> </p>
<pre class="args"> <pre class="args">
(absolute p) (absolute p)
</pre> </pre>
<p class="doc"> <p class="doc">
<p>makes an absolute path from <code>p</code>.</p>
</p> </p>
</div> </div>
<div class="binder"> <div class="binder">
@@ -90,7 +80,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] Bool) (Fn [(Ref String a)] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(absolute? p) (absolute? p)
@@ -111,7 +101,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a), (Ref String b)] String) (Fn [(Ref String a), (Ref String b)] String)
</p> </p>
<pre class="args"> <pre class="args">
(add-extension p ext) (add-extension p ext)
@@ -131,7 +121,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] String) (Fn [(Ref String a)] String)
</p> </p>
<pre class="args"> <pre class="args">
(basename p) (basename p)
@@ -151,7 +141,7 @@ has some functions to work with the <code>PATH</code> environment variable.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [] (Maybe String)) (Fn [] (Maybe String))
</p> </p>
<pre class="args"> <pre class="args">
(cwd) (cwd)
@@ -172,7 +162,7 @@ which it can fail are OS-dependent, but it should happen relatively rare.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] String) (Fn [(Ref String a)] String)
</p> </p>
<pre class="args"> <pre class="args">
(drop-extension p) (drop-extension p)
@@ -193,7 +183,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Maybe String)) (Fn [(Ref String a)] (Maybe String))
</p> </p>
<pre class="args"> <pre class="args">
(extension p) (extension p)
@@ -213,7 +203,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Maybe String)) (Fn [(Ref String a)] (Maybe String))
</p> </p>
<pre class="args"> <pre class="args">
(filename p) (filename p)
@@ -234,7 +224,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [] (Maybe (Array String))) (Fn [] (Maybe (Array String)))
</p> </p>
<pre class="args"> <pre class="args">
(get-search-path) (get-search-path)
@@ -254,7 +244,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] Bool) (Fn [(Ref String a)] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(has-extension? p) (has-extension? p)
@@ -274,7 +264,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a), (Ref String b)] Bool) (Fn [(Ref String a), (Ref String b)] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(is-extension? p ext) (is-extension? p ext)
@@ -294,7 +284,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref (Array String) a)] String) (Fn [(Ref (Array String) a)] String)
</p> </p>
<pre class="args"> <pre class="args">
(join ps) (join ps)
@@ -335,7 +325,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] Bool) (Fn [(Ref String a)] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(relative? p) (relative? p)
@@ -356,7 +346,7 @@ is none.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a), (Ref String b)] String) (Fn [(Ref String a), (Ref String b)] String)
</p> </p>
<pre class="args"> <pre class="args">
(replace-extension p ext) (replace-extension p ext)
@@ -398,7 +388,7 @@ variable we use on this OS.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [Char] Bool) (Fn [Char] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(search-path-separator? c) (search-path-separator? c)
@@ -437,7 +427,7 @@ variable we use on this OS.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref Char StaticLifetime)] Bool) (Fn [(Ref Char StaticLifetime)] Bool)
</p> </p>
<pre class="args"> <pre class="args">
(separator? c) (separator? c)
@@ -478,7 +468,7 @@ variable we use on this OS.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Array String)) (Fn [(Ref String a)] (Array String))
</p> </p>
<pre class="args"> <pre class="args">
(split p) (split p)
@@ -499,7 +489,7 @@ variable we use on this OS.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Maybe (Pair String String))) (Fn [(Ref String a)] (Maybe (Pair String String)))
</p> </p>
<pre class="args"> <pre class="args">
(split-extension p) (split-extension p)
@@ -536,7 +526,7 @@ the extension.</p>
defn defn
</div> </div>
<p class="sig"> <p class="sig">
(λ [(Ref String a)] (Array String)) (Fn [(Ref String a)] (Array String))
</p> </p>
<pre class="args"> <pre class="args">
(split-search-path p) (split-search-path p)

View File

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