package irmin-pack

  1. Overview
  2. Docs
Irmin backend which stores values in a pack file

Install

Dune Dependency

Authors

Maintainers

Sources

irmin-3.7.2.tbz
sha256=6aa5ba4c6a0233747d4bd3ab396f2b3a33bb80f9d8ed4a178c83a035033c0e52
sha512=8a5506a57e8569a11c883ca25b3c60ae7a9a03c2da111668193d7b4296434c43f1a310e78f189e4b38c234da790259d2961c6a0ae481282c18bb97f618fccfb6

doc/irmin-pack.unix/Irmin_pack_unix/Lower/Make_volume/Sparse/Ao/index.html

Module Sparse.AoSource

Sourcetype t
Sourceval end_off : t -> Optint.Int63.t

end_off t returns the largest virtual offset contained in the sparse file t. Attempting to append with a strictly smaller virtual offset will fail.

Sourceval mapping_size : t -> Optint.Int63.t

end_off t returns the current size of the mapping file associated to the sparse file t including additions not yet flushed to the file system. It can be passed to open_ao as mapping_size when opening the file again.

Sourceval create : mapping:string -> data:string -> (t, [> Io.create_error ]) result

create ~mapping ~data initializes a new empty sparse file, represented on disk by two files named mapping and data.

Sourceval open_ao : mapping_size:Optint.Int63.t -> mapping:string -> data:string -> (t, [> Io.open_error | `Closed | `Invalid_argument | `Read_out_of_bounds | `Inconsistent_store ]) result

open_ao ~mapping_size ~mapping ~data returns an append-only instance of the sparse file.

Sourceval append_seq_exn : t -> off:Optint.Int63.t -> string Irmin.Export_for_backends.Seq.t -> unit

append_seq_exn t ~off seq appends the sequence of strings seq to the sparse file t, at the virtual offset off which must be larger than the previously appended offsets.

Sourceval flush : t -> (unit, [> Io.write_error ]) result

Flush the append buffer. Does not call fsync.

Sourceval close : t -> (unit, [> Io.close_error | `Pending_flush ]) result

Close the underlying files.

OCaml

Innovation. Community. Security.