package b0

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

B00.Memo interaction.

Memo feedback

val pp_leveled_feedback : ?sep:unit B00_std.Fmt.t -> ?op_howto:B000.Op.t B00_std.Fmt.t -> show_op:B00_std.Log.level -> show_ui:B00_std.Log.level -> level:B00_std.Log.level -> [ B00.Memo.feedback | B000.Exec.feedback ] B00_std.Fmt.t

pp_leveled_feedback ~sep ~op_howto ~show_spawn_ui ~show_success ~level ppf formats memo feedback on ppf followed by sep iff something is printed (defaults to B00_std.Fmt.flush_nl).

  • B00_std.Log.Quiet formats nothing
  • B00_std.Log.Debug report all operations with B000_conv.Op.pp_short_ui.
  • show_ui is the level at which any completed operation gets logged with B000_conv.Op.pp_ui.
  • show_op is the level at which any completed operation gets logged with B000_conv.Op.pp_short_ui

The formatter op_howto should format a way to got more information about an operation, default to B00_std.Fmt.nop.

Directories and files

B0 directory

val b0_dir_env : string

b0_dir_env is "B0_DIR".

val b0_dir_name : string

b0_dir_name is "_b0" the default b0 directory name.

val b0_dir : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> B00_std.Fpath.t option Cmdliner.Term.t

b0_dir ~doc_none ~docs ~doc ~env is a cli interface for specifying a b0 directory.

  • opts are the cli options to specify it, defaults to ["b0-dir"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to b0_dir_env.
val get_b0_dir : cwd:B00_std.Fpath.t -> root:B00_std.Fpath.t -> b0_dir:B00_std.Fpath.t option -> B00_std.Fpath.t

get_b0_dir ~cwd ~root ~b0_dir determines a b0 directory. If b0_dir is Some d then this is Fpath.(cwd // d). If None then this is Fpath.(root / b0_dir_name).

val find_dir_with_b0_dir : start:B00_std.Fpath.t -> B00_std.Fpath.t option

find_dir_with_b0_dir ~start finds the first directory starting with start that has a b0_dir_name directory. None is returned if none could found or if start is relative.

File cache directory

val cache_dir_env : string

b0_dir_env is "B0_CACHE_DIR".

val cache_dir_name : string

cache_dir_name is ".cache" the default cache directory name in the b0 directory.

val cache_dir : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> B00_std.Fpath.t option Cmdliner.Term.t

cache_dir ~doc_none ~docs ~doc ~env is a cli interface for specifying a b0 cache directory.

  • opts are the cli options to specify it, default to ["cache-dir"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to cache_dir_env.
val get_cache_dir : cwd:B00_std.Fpath.t -> b0_dir:B00_std.Fpath.t -> cache_dir:B00_std.Fpath.t option -> B00_std.Fpath.t

get_cache_dir ~cwd ~b0_dir ~cache_dir determines a cache directory. If cache_dir is Some d then this is Fpath.(cwd // d). If None then this is Fpath.(b0_dir / cache_dir).

Trash directory

val trash_dir_name : string

trash_dir_name is ".trash" the default trash directoy name in the b0 directory.

val get_trash_dir : cwd:B00_std.Fpath.t -> b0_dir:B00_std.Fpath.t -> trash_dir:B00_std.Fpath.t option -> B00_std.Fpath.t

get_trash_dir ~cwd ~b0_dir ~trash_dir dtermiens a trash directory. If trash_dir is Some d then this is Fpath.(cwd // d. If None then this is Fpath.(b0_dir /trash_dir).

Log file

val log_file_env : string

b0_dir_env is "B0_LOG_FILE".

val log_file_name : string

log_file_name is ".log" the default log file name in the b0 directory.

val log_file : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> B00_std.Fpath.t option Cmdliner.Term.t

log_file ~doc_none ~docs ~doc ~env is a cli interface for specifing a b0 log file.

  • opts are the cli options to specify it, defaults to ["log-file"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to cache_dir_env.
val get_log_file : cwd:B00_std.Fpath.t -> b0_dir:B00_std.Fpath.t -> log_file:B00_std.Fpath.t option -> B00_std.Fpath.t

get_log_file ~cwd ~b0_dir ~log_file determines a log file. If log_file is Some f then this is Fpath.(cwd // f). If None then this is Fpath.(b0_dir /log_file).

Memo parameters

Jobs

val jobs_env : string

jobs_env is "B0_JOBS".

val jobs : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> int option Cmdliner.Term.t

jobs is a cli interface for specifying the maximal number of commands to spawn concurrently.

  • opts are the cli options to specify it, defaults to ["j";"jobs"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to jobs_env.
val get_jobs : jobs:int option -> int

get_jobs ~jobs determines a maximal number of spawns. If jobs is None then B00_std.Os.Cpu.logical_count is used.

Hash function

val hash_fun_env : string

hash_fun_env is "B0_HASH_FUN".

val hash_fun : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> (module B00_std.Hash.T) option Cmdliner.Term.t

hash_fun is a cli interface for specfiying hash function used for caching.

  • opts are the cli options to specify it, defaults to ["hash-fun"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_common_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to hash_fun_env.
val get_hash_fun : hash_fun:(module B00_std.Hash.T) option -> (module B00_std.Hash.T)

get_hash_fun ~hash_fun determines a hash function. If hash_fun is None then B00_std.Hash.Xxh_64 is used.

Logs

module Log : sig ... end
OCaml

Innovation. Community. Security.