package opam-format

  1. Overview
  2. Docs

Module OpamFile.Repo_config_legacySource

Repository config: $opam/repo/$repo/config. Deprecated, for migration only

Sourcetype t = {
  1. repo_name : OpamTypes.repository_name;
  2. repo_root : OpamTypes.dirname;
  3. repo_url : OpamTypes.url;
  4. repo_priority : int;
}
include IO_FILE with type t := t
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. Raise an error if the file does not exist.

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
OCaml

Innovation. Community. Security.