package opam-format

  1. Overview
  2. Docs

The type for switch names

include OpamStd.ABSTRACT
type t
val of_string : string -> t
val to_string : t -> string
val to_json : t -> OpamJson.t
module Set : sig ... end
module Map : sig ... end
val unset : t

System switch name

val is_external : t -> bool

Determines wether this switch is internal (bound to a prefix within the opam root) or living somewhere else, in which case its prefix dir is inferred from its name using get_root

val get_root : OpamFilename.Dir.t -> t -> OpamFilename.Dir.t

Returns the root directory of the switch with the given name, assuming the given opam root

val external_dirname : string

The relative dirname in which the opam switch prefix sits for external switches ("_opam")

val of_dirname : OpamFilename.Dir.t -> t

Returns an external switch handle from a directory name. Resolves to the destination if external_dirname at the given dir is a symlink to another external_dirname.

OCaml

Innovation. Community. Security.