Skip to content

Commit

Permalink
Added documentation of INTER-FS-COPOY
Browse files Browse the repository at this point in the history
  • Loading branch information
tabemann committed Nov 2, 2024
1 parent acbf773 commit 49dac76
Show file tree
Hide file tree
Showing 22 changed files with 747 additions and 429 deletions.
12 changes: 12 additions & 0 deletions docs/extra/inter_fs_copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copying Files Between Filesystems

An optional mechanism for copying files between filesystems is provided by `copy-file-to-fs` in the `inter-fs-copy` module that can be loaded from `extra/common/inter_fs_copy.fs`. This mechanism creates a new file in the destination filesystem and copies the contents of an existing file in the source filesystem into it. Note that the destination file must not already exist; if it does the user must delete it first.

### `inter-fs-copy`

The `inter-fs-copy` module contains the following word:

##### `copy-file-to-fs`
( src-path-addr src-path-bytes src-fs dest-path-addr dest-path-bytes dest-fs -- )

Copy an existing source file at *src-path-addr*/*src-path-bytes* in the filesystem *src-fs* into a newly created destination file at *dest-path-addr*/*dest-path-bytes* in the filesystem *dest-fs*. The destination file must not already exist.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Zeptoforth Documentation
words/expose
extra/fixed32
extra/complex_float32
extra/inter_fs_copy
extra/profile
extra/zeptoed
extra/display
Expand Down
Binary file modified epub/.doctrees/environment.pickle
Binary file not shown.
Binary file added epub/.doctrees/extra/inter_fs_copy.doctree
Binary file not shown.
Binary file modified epub/.doctrees/index.doctree
Binary file not shown.
282 changes: 142 additions & 140 deletions epub/content.opf

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions epub/extra/inter_fs_copy.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

<title>Copying Files Between Filesystems</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/epub.css" />
</head><body>

<div class="document">
<div class="documentwrapper">
<div class="body" role="main">

<section id="copying-files-between-filesystems">
<h1>Copying Files Between Filesystems</h1>
<p>An optional mechanism for copying files between filesystems is provided by <code class="docutils literal notranslate"><span class="pre">copy-file-to-fs</span></code> in the <code class="docutils literal notranslate"><span class="pre">inter-fs-copy</span></code> module that can be loaded from <code class="docutils literal notranslate"><span class="pre">extra/common/inter_fs_copy.fs</span></code>. This mechanism creates a new file in the destination filesystem and copies the contents of an existing file in the source filesystem into it. Note that the destination file must not already exist; if it does the user must delete it first.</p>
<section id="inter-fs-copy">
<h2><code class="docutils literal notranslate"><span class="pre">inter-fs-copy</span></code></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">inter-fs-copy</span></code> module contains the following word:</p>
<section id="copy-file-to-fs">
<h3><code class="docutils literal notranslate"><span class="pre">copy-file-to-fs</span></code></h3>
<p>( src-path-addr src-path-bytes src-fs dest-path-addr dest-path-bytes dest-fs – )</p>
<p>Copy an existing source file at <em>src-path-addr</em>/<em>src-path-bytes</em> in the filesystem <em>src-fs</em> into a newly created destination file at <em>dest-path-addr</em>/<em>dest-path-bytes</em> in the filesystem <em>dest-fs</em>. The destination file must not already exist.</p>
</section>
</section>
</section>


<div class="clearer"></div>
</div>
</div>
<div class="clearer"></div>
</div>
</body>
</html>
1 change: 1 addition & 0 deletions epub/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<li class="toctree-l1"><a class="reference internal" href="words/expose.xhtml">Exposed Kernel Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/fixed32.xhtml">S15.16 Fixed Point Numbers</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/complex_float32.xhtml">Complex Numbers Based on Single-Precision Floating-Point Values</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/inter_fs_copy.xhtml">Copying Files Between Filesystems</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/profile.xhtml">Profiler Words</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/zeptoed.xhtml">zeptoed</a></li>
<li class="toctree-l1"><a class="reference internal" href="extra/display.xhtml">Bitmaps and Displays</a></li>
Expand Down
13 changes: 13 additions & 0 deletions epub/nav.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -7021,6 +7021,19 @@
</li>
</ol>
</li>
<li>
<a href="extra/inter_fs_copy.xhtml">Copying Files Between Filesystems</a>
<ol>
<li>
<a href="extra/inter_fs_copy.xhtml#inter-fs-copy">inter-fs-copy</a>
<ol>
<li>
<a href="extra/inter_fs_copy.xhtml#copy-file-to-fs">copy-file-to-fs</a>
</li>
</ol>
</li>
</ol>
</li>
<li>
<a href="extra/profile.xhtml">Profiler Words</a>
<ol>
Expand Down
Loading

0 comments on commit 49dac76

Please sign in to comment.