package opam-format

  1. Overview
  2. Docs

Module OpamFile.URLSource

Urls for OPAM repositories

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. 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
Sourceval create : ?mirrors:OpamTypes.url list -> ?checksum:OpamHash.t list -> ?swhid:OpamSWHID.t -> ?subpath:OpamTypes.subpath -> OpamTypes.url -> t
Sourceval url : t -> OpamTypes.url

URL address

Sourceval mirrors : t -> OpamTypes.url list
Sourceval checksum : t -> OpamHash.t list

Archive checksum

Sourceval swhid : t -> OpamSWHID.t option
Sourceval with_url : OpamTypes.url -> t -> t

Constructor

Sourceval with_checksum : OpamHash.t list -> t -> t
Sourceval with_mirrors : OpamUrl.t list -> t -> t
Sourceval with_swhid : OpamSWHID.t -> t -> t
Sourceval with_swhid_opt : OpamSWHID.t option -> t -> t
Sourceval with_subpath : OpamTypes.subpath -> t -> t
Sourceval with_subpath_opt : OpamTypes.subpath option -> t -> t
Sourceval subpath : t -> OpamTypes.subpath option
OCaml

Innovation. Community. Security.