Skip to content

Commit

Permalink
Update iter doc to 1.9.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Feb 5, 2025
1 parent 98e5d62 commit b429e6a
Show file tree
Hide file tree
Showing 39 changed files with 1,069 additions and 231 deletions.
2 changes: 1 addition & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="iter/index.html">iter</a> <span class="version">1.8</span></li>
<li><a href="iter/index.html">iter</a> <span class="version">1.9</span></li>
</ol>
</div>
</main>
Expand Down
26 changes: 13 additions & 13 deletions doc/iter/Iter/IO/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.Iter.IO)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">iter</a> &#x00BB; <a href="../index.html">Iter</a> &#x00BB; IO</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.IO</span></code></h1><p>Basic IO</p><p>Very basic interface to manipulate files as iterator of chunks/lines. The iterators take care of opening and closing files properly; every time one iterates over an iterator, the file is opened/closed again.</p><p>Example: copy a file <code>&quot;a&quot;</code> into file <code>&quot;b&quot;</code>, removing blank lines:</p><pre class="language-ocaml"><code>Iterator.(IO.lines_of &quot;a&quot; |&gt; filter (fun l-&gt; l&lt;&gt; &quot;&quot;) |&gt; IO.write_lines &quot;b&quot;);;</code></pre><p>By chunks of <code>4096</code> bytes:</p><pre class="language-ocaml"><code>Iterator.IO.(chunks_of ~size:4096 &quot;a&quot; |&gt; write_to &quot;b&quot;);;</code></pre><p>Read the lines of a file into a list:</p><pre class="language-ocaml"><code>Iterator.IO.lines &quot;a&quot; |&gt; Iterator.to_list</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.1</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span>?mode:int <span class="arrow">&#45;&gt;</span></span> <span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
<span>?mode:int <span class="arrow">&#45;&gt;</span></span>
<span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?size:int <span class="arrow">&#45;&gt;</span></span>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.Iter.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">iter</a> &#x00BB; <a href="../index.html">Iter</a> &#x00BB; IO</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.IO</span></code></h1><p>Basic IO</p><p>Very basic interface to manipulate files as iterator of chunks/lines. The iterators take care of opening and closing files properly; every time one iterates over an iterator, the file is opened/closed again.</p><p>Example: copy a file <code>&quot;a&quot;</code> into file <code>&quot;b&quot;</code>, removing blank lines:</p><pre class="language-ocaml"><code>Iterator.(IO.lines_of &quot;a&quot; |&gt; filter (fun l-&gt; l&lt;&gt; &quot;&quot;) |&gt; IO.write_lines &quot;b&quot;);;</code></pre><p>By chunks of <code>4096</code> bytes:</p><pre class="language-ocaml"><code>Iterator.IO.(chunks_of ~size:4096 &quot;a&quot; |&gt; write_to &quot;b&quot;);;</code></pre><p>Read the lines of a file into a list:</p><pre class="language-ocaml"><code>Iterator.IO.lines &quot;a&quot; |&gt; Iterator.to_list</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.1</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
<span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?size</span>:int <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p>Read chunks of the given <code>size</code> from the file. The last chunk might be smaller. Behaves like <a href="#val-lines_of"><code>lines_of</code></a> regarding errors and options. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write_to"><a href="#val-write_to" class="anchor"></a><code><span><span class="keyword">val</span> write_to :
<span>?mode:int <span class="arrow">&#45;&gt;</span></span>
<span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>string <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>write_to filename seq</code> writes all strings from <code>seq</code> into the given file. It takes care of opening and closing the file.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>used by <code>open_out_gen</code>. Default: <code>[Open_creat;Open_wronly]</code>.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write_bytes_to"><a href="#val-write_bytes_to" class="anchor"></a><code><span><span class="keyword">val</span> write_bytes_to :
<span>?mode:int <span class="arrow">&#45;&gt;</span></span>
<span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Stdlib</span>.Bytes.t <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.4</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write_lines"><a href="#val-write_lines" class="anchor"></a><code><span><span class="keyword">val</span> write_lines :
<span>?mode:int <span class="arrow">&#45;&gt;</span></span>
<span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>string <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p>Same as <a href="#val-write_to"><code>write_to</code></a>, but intercales <code>'\n'</code> between each string</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-write_bytes_lines"><a href="#val-write_bytes_lines" class="anchor"></a><code><span><span class="keyword">val</span> write_bytes_lines :
<span>?mode:int <span class="arrow">&#45;&gt;</span></span>
<span>?flags:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?mode</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Stdlib</span>.Bytes.t <a href="../index.html#type-t">t</a></span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.4</li></ul></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.4</li></ul></div></div></div></body></html>
2 changes: 1 addition & 1 deletion doc/iter/Iter/Infix/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit b429e6a

Please sign in to comment.