package odig

  1. Overview
  2. Docs

Odig configuration.

Configuration

type t

The type for odig configuration.

val default_file : Fpath.t

default_file is the default configuration file.

val v : ?trust_cache:bool -> cachedir:Fpath.t -> libdir:Fpath.t -> docdir:Fpath.t -> docdir_href:string option -> unit -> t

v ~trust_cache ~cachedir ~libdir ~docdir ~docdir_href () is a configuration using cachedir as the odig cache directory, libdir for looking up package compilation objects, docdir for looking up package documentation and docdir_href for specifying the location of docdir in generated html. If trust_cache is true (defaults to false) indicates the data of cachedir should be trusted regardless of whether libdir and docdir may have changed.

val with_conf : ?trust_cache:bool -> ?docdir_href:string option -> t -> t

of_conf ~trust_cache ~docdir_href c is c updated with arguments specified, unspecfied ones are left untouched.

val of_file : ?trust_cache:bool -> Fpath.t -> (t, [ `Msg of string ]) Pervasives.result

of_file f reads a configuration from configuration file f. See v.

val of_opam_switch : ?trust_cache:bool -> ?switch:string -> ?docdir_href:string -> unit -> (t, [ `Msg of string ]) Pervasives.result

of_opam_switch ~switch () is a configuration for the opam switch switch (defaults to the current switch). See v.

val libdir : t -> Fpath.t

libdir c is c's package library directory.

val docdir : t -> Fpath.t

docdir c is c's package documentation directory.

val docdir_href : t -> string option

docdir_href c is, for HTML generation, the base URI under which docdir is accessible expressed (if) relative to the root package list. If unspecified links to docdir are made by relativizing docdir w.r.t. to the location of the generated HTML file.

Cache

val cachedir : t -> Fpath.t

cachedir c is c's odig cache directory.

val trust_cache : t -> bool

trust_cache c indicates if c is trusting odig's cache.

val clear_cache : t -> (unit, [ `Msg of string ]) Pervasives.result

clear_cache c deletes c's cache directory.

Package cache

val pkg_cachedir : t -> Fpath.t

pkg_cachedir c is c's cache directory for packages it is located inside cachedir.

val cached_pkgs_names : t -> (Astring.String.set, [ `Msg of string ]) Pervasives.result

cached_pkgs_names c is the set of names of the packages that are cached in c. Note that these packages may not correspond or be up-to-date with packages found in the configuration.