package mgit

  1. Overview
  2. Docs

Module Mgit_blk.AppendSource

An append-only block device.

This module lets the user to manipulate a block device as an append-only block device. In other words, bytes can only be appended up to a certain limit. If this limit is reached, the Out_of_space exception is raised. The bytes are written as soon as a sector can be written to the block device. If the user wishes to force the write, the flush function is available (and the remaining bytes will be replaced by "\000"). Write operations to a sector are atomic.

Sourceexception Out_of_space
Sourcemodule type S = sig ... end
Sourcemodule Make (Block : Device.S) : S with type blk = Block.t