From b36bea5bc4f21f8f78d73c2bc019c54afedea009 Mon Sep 17 00:00:00 2001
From: Simon Cruanes Simple buffer. These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests. Access underlying slice of bytes. Get contents of the buffer and clear it. Append given bytes slice to the buffer. Simple buffer. These buffers are used to avoid allocating too many byte arrays when processing streams and parsing requests. Access underlying slice of bytes. Get contents of the buffer and clear it. Append given bytes slice to the buffer. 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. Add file to the virtual file system. 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.Module
Tiny_httpd_bufval size : t -> intval clear : t -> unitval create : ?size:int -> unit -> tval contents : t -> stringval bytes_slice : t -> bytesval contents_and_clear : t -> stringval add_bytes : t -> bytes -> int -> int -> unitModule
Tiny_httpd_bufval size : t -> intval clear : t -> unitval create : ?size:int -> unit -> tval contents : t -> stringval bytes_slice : t -> bytesval contents_and_clear : t -> stringval add_bytes : t -> bytes -> int -> int -> unitModule
Tiny_httpd_dir.Embedded_fsval create : ?mtime:float -> unit -> tval add_file : ?mtime:float -> t -> path:string -> string -> unitModule
Tiny_httpd_dir.Embedded_fs
val config : ?download:bool -> ?dir_behavior:dir_behavior -> ?delete:bool -> ?upload:bool ->
-?max_upload_size:int -> unit -> configBuild a config from default_config.
val add_dir_path : config:config -> dir:string -> prefix:string -> Tiny_httpd_server.t -> unitadd_dirpath ~config ~dir ~prefix server adds route handle to the server to serve static files in dir when url starts with prefix, using the given configuration config.
module type VFS = sig ... endVirtual file system.
val vfs_of_dir : string -> (module VFS)vfs_of_dir dir makes a virtual file system that reads from the disk.
val add_vfs : config:config -> vfs:(module VFS) -> prefix:string -> Tiny_httpd_server.t -> unitSimilar to add_dir_path but using a virtual file system instead.
module Embedded_fs : sig ... endAn 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.