type _ hash =
| SHA1 : Digestif.SHA1.t hash
module Entry : sig ... end
val exists : 'oid t -> Fpath.t -> bool
val find : 'oid t -> Fpath.t -> 'oid Entry.t option
val replace : 'oid t -> 'oid Entry.t -> unit
val add :
hash:'oid hash ->
Fpath.t ->
'oid t ->
(unit, [> Rresult.R.msg ]) Stdlib.result
val rem : Fpath.t -> 'oid t -> unit
val make : ?version:int -> 'oid hash -> 'oid t
val load :
hash:'oid hash ->
Fpath.t ->
('oid t, [> Rresult.R.msg ]) Stdlib.result
val store :
hash:'oid hash ->
append:('fd -> Bigstringaf.t -> 'fd) ->
'fd ->
'oid t ->
'fd
val store_to_path :
hash:'oid hash ->
Fpath.t ->
'oid t ->
(unit, [> Rresult.R.msg ]) Stdlib.result
type 'oid elt = [
| `Tree of Fpath.t
| `Blob of 'oid Entry.t
]
val fold :
f:
([ 'oid elt | `Root ] ->
'oid elt list ->
'a ->
('a, [> Rresult.R.msg ] as 'err) Stdlib.result Lwt.t) ->
'a ->
'oid t ->
('a, 'err) Stdlib.result Lwt.t