nanoev/tiny_httpd/Tiny_httpd_unix/Dir/Embedded_fs/index.html
2025-05-05 14:16:16 +00:00

2 lines
2.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Embedded_fs (tiny_httpd.Tiny_httpd_unix.Dir.Embedded_fs)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../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">Index</a> &#x00BB; <a href="../../../index.html">tiny_httpd</a> &#x00BB; <a href="../../index.html">Tiny_httpd_unix</a> &#x00BB; <a href="../index.html">Dir</a> &#x00BB; Embedded_fs</nav><header class="odoc-preamble"><h1>Module <code><span>Dir.Embedded_fs</span></code></h1><p>An embedded file system, as a list of files with (relative) paths. This is useful in combination with the &quot;tiny-httpd-mkfs&quot; tool, which embeds the files it's given into a OCaml module.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.12</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>The pseudo-filesystem</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span><span class="optlabel">?mtime</span>:float <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_file"><a href="#val-add_file" class="anchor"></a><code><span><span class="keyword">val</span> add_file : <span><span class="optlabel">?mtime</span>:float <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="label">path</span>:string <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Add file to the virtual file system.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if the path contains '..' or if it tries to make a directory out of an existing path that is a file.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_vfs"><a href="#val-to_vfs" class="anchor"></a><code><span><span class="keyword">val</span> to_vfs : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>(<span class="keyword">module</span> <a href="../module-type-VFS/index.html">VFS</a>)</span></span></code></div></div></div></body></html>