package opam-format

  1. Overview
  2. Docs

.install files

include IO_FILE
type t

File contents

val format_version : OpamVersion.t
val empty : t

Empty file

val write : t typed_file -> t -> unit

Write some contents to a file

val read : t typed_file -> t

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

val read_opt : t typed_file -> t option

Returns None on non-existing file

val safe_read : t typed_file -> t

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

val read_from_channel : ?filename:t typed_file -> Stdlib.in_channel -> t
val read_from_string : ?filename:t typed_file -> string -> t
val write_to_channel : ?filename:t typed_file -> Stdlib.out_channel -> t -> unit
val write_to_string : ?filename:t typed_file -> t -> string

List of files to install in $bin/

List of files to install in $sbin/

List of files to install in $lib/

val toplevel : t -> (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list

List of toplevel files

val stublibs : t -> (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list

C bindings

List of architecture-independent files

val share_root : t -> (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list

List of files under the more general share prefix

List of etc files

List of doc files

Man pages

Executable files under lib/

val lib_root : t -> (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list

Not relative to the package's lib dir

val libexec_root : t -> (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list

Not relative to the package's lib dir, and with +x set

List of other files to install

val with_bin : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of files to install in $bin/

val with_sbin : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of files to install in $sbin/

val with_lib : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of files to install in $lib/

val with_toplevel : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of toplevel files

val with_stublibs : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

C bindings

val with_share : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of architecture-independent files

val with_share_root : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of files under the more general share prefix

val with_etc : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of etc files

val with_doc : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

List of doc files

val with_man : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

Man pages

val with_libexec : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

Executable files under lib/

val with_lib_root : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

Not relative to the package's lib dir

val with_libexec_root : (OpamTypes.basename OpamTypes.optional * OpamTypes.basename option) list -> t -> t

Not relative to the package's lib dir, and with +x set

List of other files to install

OCaml

Innovation. Community. Security.