Module OpamRepositoryRoot

This module abstract the notion of repository root over its concrete implementation (could be a database, a file, a directory, etc.)

module Dir : sig ... end

Repository root implemented as a directory

val make_tar_gz_job : OpamTypes.filename -> Dir.t -> exn option OpamProcess.job
val extract_in_job : OpamTypes.filename -> Dir.t -> exn option OpamProcess.job
type t =
  1. | Dir of Dir.t
val quarantine : t -> t

quarantine repo_root returns a temporary repository root dedicated to repo_root. the returned repository is not created on disk and points to a statically known repository located in the same parent directory as repo_root.

val backup : inn:OpamTypes.dirname -> t -> t
val remove : t -> unit
val is_empty : t -> bool option
val make_empty : t -> unit
val dirname : t -> OpamTypes.dirname
val basename : t -> OpamTypes.basename
val to_string : t -> string
val copy : src:t -> dst:t -> unit
val move : src:t -> dst:t -> unit
val exists : t -> bool
val patch : allow_unclean:bool -> [ `Patch_file of OpamTypes.filename | `Patch_diffs of Patch.t list ] -> t -> (Patch.operation list, exn) Stdlib.result
val delayed_read_repo : t -> bool * (unit -> OpamFile.Repo.t)

Returns a pair (exists, f) where exists tells whether the repo file exists in the repository and f reads it