jon.recoil.org

Module OpamDirTrackSource

Sourcetype digest

uniquely identifies a filesystem item value

Sourcetype change =
  1. | Added of OpamDirTrack.digest
  2. | Removed
  3. | Contents_changed of OpamDirTrack.digest
    (*

    For links, corresponds to a change of target

    *)
  4. | Perm_changed of OpamDirTrack.digest
  5. | Kind_changed of OpamDirTrack.digest
    (*

    Used e.g. when a file is replaced by a directory, a link or a fifo

    *)

Defines a change concerning a fs item; The digest parameter is the new value of the item

Sourceval to_string : OpamDirTrack.t -> string

Returns a printable, multi-line string

Sourceval to_summary_string : OpamDirTrack.t -> string

Returns a summary of the changes as a printable, single-line string

Sourceval digest_of_string : string -> OpamDirTrack.digest
Sourceval string_of_digest : OpamDirTrack.digest -> string
Sourceval string_of_change : ?full:bool -> OpamDirTrack.change -> string

Return the change action, with digest if full is set to true

Wraps a job to track the changes that happened under dirname during its execution (changes done by the application of the job function to () are tracked too, for consistency with jobs without commands)

Sourceval track_files : prefix:OpamFilename.Dir.t -> string list -> ?except:OpamFilename.Base.Set.t -> (unit -> 'a OpamProcess.job) -> ('a * OpamDirTrack.t) OpamProcess.job

track_files prefix paths ?except job as track wraps a job to track changes for a predefined list of paths (files and directories). paths are relative to prefix.

Sourceval revert : ?title:string -> ?verbose:bool -> ?force:bool -> ?dryrun:bool -> OpamFilename.Dir.t -> OpamDirTrack.t -> unit

Removes the added and kind-changed items unless their contents changed and force isn't set, and prints warnings for other changes unless verbose is set to false. Ignores non-existing files. title is used to prefix messages if specified.

Sourceval check : OpamFilename.Dir.t -> OpamDirTrack.t -> (OpamFilename.t * [ `Unchanged | `Removed | `Changed ]) list

Checks the items that were added or kind-changed in the given diff, and returns their status

Reload all the digests from the directory prefix. Remove a file from the map if it has been removed from the file-system.