package opam-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Repository metadata

include IO_FILE
type t

File contents

val empty : t

Empty file

val write : OpamTypes.filename -> t -> unit

Write some contents to a file

val read : OpamTypes.filename -> t

Read file contents. Raise an error if the file does not exist.

val safe_read : OpamTypes.filename -> t

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

val read_from_channel : ?filename:OpamTypes.filename -> Stdlib.in_channel -> t

Read from channel.

val read_from_string : ?filename:OpamTypes.filename -> string -> t
val write_to_channel : Stdlib.out_channel -> t -> unit

Write to channel.

val create : ?browse:string -> ?upstream:string -> ?opam_version:string -> ?redirect:(string * OpamTypes.filter option) list -> unit -> t
val opam_version : t -> OpamVersion.t

The minimum OPAM version required for this repository

val browse : t -> string option

Base URL for browsing packages on the WWW

val upstream : t -> string option

Base URL for browsing OPAM repository source on the WWW

val redirect : t -> (string * OpamTypes.filter option) list

Redirections.

OCaml

Innovation. Community. Security.