package qcow

  1. Overview
  2. Docs

A block device which is padded with virtual zeroes so that reads beyond the current end don't fail.

Parameters

Signature

include Qcow_s.RESIZABLE_BLOCK with type t = B.t
include Mirage_block.S with type t = B.t
type error = private [>
  1. | Mirage_device.error
]
val pp_error : error Fmt.t
type write_error = private [>
  1. | `Disconnected
  2. | `Is_read_only
  3. | `Unimplemented
]
val pp_write_error : write_error Fmt.t
type t = B.t
val disconnect : t -> unit Lwt.t
val get_info : t -> Mirage_block.info Lwt.t
val read : t -> int64 -> Cstruct.t list -> (unit, error) Stdlib.result Lwt.t
val write : t -> int64 -> Cstruct.t list -> (unit, write_error) Stdlib.result Lwt.t
val resize : t -> int64 -> (unit, write_error) Stdlib.result Lwt.t

Resize the file to the given number of sectors.

val flush : t -> (unit, write_error) Stdlib.result Lwt.t

flush t flushes any buffers, if the file has been opened in buffered mode

OCaml

Innovation. Community. Security.