package opam-format

  1. Overview
  2. Docs

Module OpamFile.Dot_configSource

.config files

include IO_FILE
Sourcetype t

File contents

Sourceval format_version : OpamVersion.t
Sourceval empty : t

Empty file

Sourceval write : t typed_file -> t -> unit

Write some contents to a file

Sourceval read : t typed_file -> t

Read file contents.

Sourceval read_opt : t typed_file -> t option

Returns None on non-existing file

Sourceval safe_read : t typed_file -> t

Read file contents. Return empty if the file does not exist.

Sourceval read_from_channel : ?filename:t typed_file -> in_channel -> t
Sourceval read_from_string : ?filename:t typed_file -> string -> t
Sourceval write_to_channel : ?filename:t typed_file -> out_channel -> t -> unit
Sourceval write_to_string : ?filename:t typed_file -> t -> string

Create a new .config file (containing only variables)

Sourceval file_depends : t -> (OpamTypes.filename * OpamHash.t) list

Dependency towards file-system paths and their hashes

Sourceval with_file_depends : (OpamTypes.filename * OpamHash.t) list -> t -> t

Sets all bindings in the file

Top-level variables

Sourceval variables : t -> OpamTypes.variable list

The list of top-level variables

Lists all the variable bindings in the file

Sets the given variable, overriding any previous definition. With None, unsets the variable

OCaml

Innovation. Community. Security.