package irmin-pack
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=09996fbcc2c43e117a9bd8e9028c635e81cccb264d5e02d425ab8b06bbacdbdb
sha512=0391a6bf7b94a1edd50a3a8df9e58961739fa78d7d689d61f56bc87144483bad2ee539df595c33d9d52c29b3458da5dddf3a73b5eb85e49c4667c26d2cd46be1
doc/irmin-pack.unix/Irmin_pack_unix/Dispatcher/Make/argument-1-Fm/Sparse/Ao/index.html
Module Sparse.Ao
val end_off : t -> Optint.Int63.tend_off t returns the largest virtual offset contained in the sparse file t. Attempting to append with a strictly smaller virtual offset will fail.
val mapping_size : t -> Optint.Int63.tend_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.
val create : mapping:string -> data:string -> (t, [> Io.create_error ]) resultcreate ~mapping ~data initializes a new empty sparse file, represented on disk by two files named mapping and data.
val open_ao :
mapping_size:Optint.Int63.t ->
mapping:string ->
data:string ->
(t,
[> Io.open_error
| `Closed
| `Invalid_argument
| `Read_out_of_bounds
| `Inconsistent_store ])
resultopen_ao ~mapping_size ~mapping ~data returns an append-only instance of the sparse file.
val append_seq_exn :
t ->
off:Optint.Int63.t ->
string Irmin.Export_for_backends.Seq.t ->
unitappend_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.
val flush : t -> (unit, [> Io.write_error ]) resultFlush the append buffer. Does not call fsync.
val close : t -> (unit, [> Io.close_error | `Pending_flush ]) resultClose the underlying files.