package mirage-block-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type sync_behaviour = [
  1. | `ToOS
    (*

    flush to the operating system, not necessarily the drive

    *)
  2. | `ToDrive
    (*

    flush to the drive

    *)
]
val string_of_sync : sync_behaviour option -> string
type t = {
  1. buffered : bool;
    (*

    true if I/O hits the OS disk caches, false if "direct"

    *)
  2. sync : sync_behaviour option;
  3. path : string;
    (*

    path to the underlying file

    *)
  4. lock : bool;
    (*

    true if the file should be locked preventing concurrent modification

    *)
}

Configuration of a device

val create : ?buffered:bool -> ?sync:sync_behaviour option -> ?lock:bool -> string -> t

create ?buffered ?sync ?lock path constructs a configuration referencing the file stored at path.

val to_string : t -> string

Marshal a config into a string of the form file://<path>?sync=(0|1)&buffered=(0|1)

val of_string : string -> (t, [ `Msg of string ]) Stdlib.result

Parse the result of a previous to_string invocation

OCaml

Innovation. Community. Security.