package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=92a9de7a0a2a35c2feba0c35a806b1f0df24c1c0d15164eebf3f919296d26715
sha512=0203ec5117a851ad5afeb2f9091659b4e142e231b6b945caab93f4d7beb23397c8ac43f7056e91d18f4bff0be1062f6ae966d221f877c229328c0cbbf29fd9f0
doc/irmin-pack.unix/Irmin_pack_unix/Sparse_file/Make/Ao/index.html
Module Make.Ao
Source
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.
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.
create ~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 ])
result
open_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 ->
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.
Flush the append buffer. Does not call fsync
.
Close the underlying files.