package yocaml_runtime

  1. Overview
  2. Docs

Describes the request path.

type 'a t =
  1. | File of 'a * string
  2. | Dir of 'a * string list
  3. | Error404
val content_type : string -> string

Give the content-type of a filename.

val from_path : is_file:('a -> bool) -> is_directory:('a -> bool) -> concat:('a -> string -> 'a) -> native:('a -> string) -> 'a -> path:string -> 'a t

from_path generically lift an HTTP path to a requested path.

OCaml

Innovation. Community. Security.