package mirage-fs-lwt

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Consider a filesystem device as a key/value read-only store.

Parameters

module FS : S

Signature

include Mirage_kv_lwt.RO with type t = FS.t
type error = private [>
  1. | `Unknown_key of string
]

The type for errors.

val pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

include Mirage_device.S with type 'a io = 'a Lwt.t with type t = FS.t
type 'a io = 'a Lwt.t

The type for potentially blocking I/O operation

type t = FS.t

The type representing the internal state of the device

val disconnect : t -> unit io

Disconnect from the device. While this might take some time to complete, it can never result in an error.

type page_aligned_buffer = Cstruct.t

The type for memory buffers.

val read : t -> string -> int64 -> int64 -> (page_aligned_buffer list, error) Stdlib.result io

read t key offset length reads up to length bytes from the value associated with key. If less data is returned than requested, this indicates the end of the value.

val mem : t -> string -> (bool, error) Stdlib.result io

mem t key returns true if a value is set for key in t, and false if not so.

val size : t -> string -> (int64, error) Stdlib.result io

Get the value size.

val connect : FS.t -> t io
OCaml

Innovation. Community. Security.