package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=9cfb7291a7d90ca0e55ece33040ad41e74cadd8c6446e04c33558bc1a1951518
sha512=9605acd77de9aae70ae96554a28594e6ed5beba70a48145c0fc2204b32bb23b843ba98cf034e88391581d5f3495154195c644d64a3aa3f8d3994a9c5518c5cda
doc/irmin-pack.unix/Irmin_pack_unix/Checks/Make/argument-1-_/Snapshot/index.html
Module _.Snapshot
val kinded_hash_t : kinded_hash Irmin.Type.t
val entry_t : entry Irmin.Type.t
val inode_tree_t : inode_tree Irmin.Type.t
val v_t : v Irmin.Type.t
val inode_t : inode Irmin.Type.t
val t : t Irmin.Type.t
val export :
?on_disk:[ `Path of string ] ->
repo ->
(t -> unit Lwt.t) ->
root_key:Tree.kinded_key ->
int Lwt.t
export ?on_disk repo f ~root_key
applies f
to all inodes and contents in a rooted tree, with root specified by root_key
.
The traversal requires an index to keep track of visited elements.
- if
on_disk
is not specified, the index is in memory. - if
on_disk
is`Path path
, a temporary index is created at path.
The traversal order is stable. In Inode_tree
, it is lexicographic on the index
function (see Conf.inode_child_order
). In Inode_value
, it is lexicographic on the steps.
f
is called in post-order, that is f
is first called on the leaves, and the last call to f
is on the root designated by root_key
.
The traversal skips objects that are structurally equal to objects that were already traversed. In other words, export
internally uses a hash set in order to guarantee that all the objects passed to f
don't hash the same way.
Returns the total number of elements visited.
module Import : sig ... end