| 1 |
(**************************************************************************) |
| 2 |
(* *) |
| 3 |
(* Copyright 2012-2017 OCamlPro *) |
| 4 |
(* Copyright 2012 INRIA *) |
| 5 |
(* *) |
| 6 |
(* All rights reserved. This file is distributed under the terms of the *) |
| 7 |
(* GNU Lesser General Public License version 2.1, with the special *) |
| 8 |
(* exception on linking described in the file LICENSE. *) |
| 9 |
(* *) |
| 10 |
(**************************************************************************) |
| 11 |
|
| 12 |
(** The type for switch names *) |
| 13 |
|
| 14 |
include OpamStd.ABSTRACT |
| 15 |
|
| 16 |
(** System switch name *) |
| 17 |
val unset: t |
| 18 |
|
| 19 |
(** Determines wether this switch is internal (bound to a prefix within the opam |
| 20 |
root) or living somewhere else, in which case its prefix dir is inferred |
| 21 |
from its name using [get_root] *) |
| 22 |
val is_external: t -> bool |
| 23 |
|
| 24 |
(** Returns the root directory of the switch with the given name, assuming the |
| 25 |
given opam root *) |
| 26 |
val get_root: OpamFilename.Dir.t -> t -> OpamFilename.Dir.t |
| 27 |
|
| 28 |
(** The relative dirname in which the opam switch prefix sits for external |
| 29 |
switches ("_opam") *) |
| 30 |
val external_dirname: string |
| 31 |
|
| 32 |
(** Returns an external switch handle from a directory name. Resolves to the |
| 33 |
destination if [external_dirname] at the given dir is a symlink to another |
| 34 |
[external_dirname]. *) |
| 35 |
val of_dirname: OpamFilename.Dir.t -> t |