(** An opam switch and the paths odd uses within it. *) type t val v : Fpath.t -> t (** [v prefix] is the switch at [prefix]. A relative path is resolved against the current directory. *) val detect : unit -> (t, [ `Msg of string ]) result (** The current switch, from [$OPAM_SWITCH_PREFIX] or [opam var prefix]. *) val prefix : t -> Fpath.t val state_dir : t -> Fpath.t (** [/var/cache/odd], holding the log and lock. *) val log_file : t -> Fpath.t val lock_file : t -> Fpath.t val work_dir : t -> Fpath.t (** Scratch directory the driver is run from (it creates [_index]/[_mld] relative to its cwd). *) val odoc_dir : t -> Fpath.t (** [/odoc] — the driver's default odoc/odocl/html output tree. (Kept separate from opam's own [/doc], where packages install their documentation.) *) val packages_dir : t -> Fpath.t (** [/.opam-switch/packages] — opam's record of installed package metadata. *) val installed : t -> (string * string) list (** Installed packages as [(name, version)], sorted by name, from the contents of {!packages_dir}. *)