Module OpamFile.ConfigSource
Configuration file: $opam/config
include OpamFile.IO_FILE
File contents
Empty file
Write some contents to a file
Read file contents.
Returns None on non-existing file
Read file contents. Return empty if the file does not exist.
val read_from_channel :
?filename:OpamFile.Config.t OpamFile.typed_file ->
Stdlib.in_channel ->
OpamFile.Config.tval read_from_string :
?filename:OpamFile.Config.t OpamFile.typed_file ->
string ->
OpamFile.Config.tval write_to_channel :
?filename:OpamFile.Config.t OpamFile.typed_file ->
Stdlib.out_channel ->
OpamFile.Config.t ->
unitval write_to_string :
?filename:OpamFile.Config.t OpamFile.typed_file ->
OpamFile.Config.t ->
stringCurrent root version
OCaml switch updates
The list of switches, ordered by most recently used first
val with_repositories :
OpamTypes.repository_name list ->
OpamFile.Config.t ->
OpamFile.Config.tRepository updates
Update opam-version
val with_criteria :
(OpamTypes.solver_criteria * string) list ->
OpamFile.Config.t ->
OpamFile.Config.tval with_global_variables :
(OpamTypes.variable * OpamTypes.variable_contents * string) list ->
OpamFile.Config.t ->
OpamFile.Config.tval with_eval_variables :
(OpamTypes.variable * string list * string) list ->
OpamFile.Config.t ->
OpamFile.Config.tval with_validation_hook_opt :
OpamTypes.arg list option ->
OpamFile.Config.t ->
OpamFile.Config.tval with_sys_pkg_manager_cmd :
OpamTypes.filename OpamStd.String.Map.t ->
OpamFile.Config.t ->
OpamFile.Config.tval with_git_location_opt :
OpamTypes.dirname option ->
OpamFile.Config.t ->
OpamFile.Config.tReturn the opam version
Return the opam root version, if not defined returns the default version value 2.1~~previous
Return the opam root version if defined
Return the list of repository
Return the OCaml switch
Return the number of jobs defined
Return the number of download jobs
val global_variables :
OpamFile.Config.t ->
(OpamTypes.variable * OpamTypes.variable_contents * string) listvariable, value, docstring
variable, command, docstring
val fields :
(string
* (OpamFile.Config.t, OpamParserTypes.FullPos.value) OpamPp.field_parser)
listval to_list :
?filename:'a OpamFile.typed_file ->
OpamFile.Config.t ->
(string * OpamParserTypes.FullPos.value) listAll file fields as print-AST, Fields within sections are accessed through dot-separated paths
Raw read the config file to extract opam-root-version field value.