mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 19:25:39 -05:00
2 lines
2.9 KiB
HTML
2 lines
2.9 KiB
HTML
<!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> » <a href="../../../index.html">tiny_httpd</a> » <a href="../../index.html">Tiny_httpd_unix</a> » <a href="../index.html">Dir</a> » 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 "tiny-httpd-mkfs" 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">-></span></span> <span>unit <span class="arrow">-></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">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span class="label">path</span>:string <span class="arrow">-></span></span> <span>string <span class="arrow">-></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">-></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>
|