package fat-filesystem

  1. Overview
  2. Docs

Parameters

module B : sig ... end
module M : sig ... end

Signature

type block_device_error = B.error
type error = [
  1. | `Block_device of block_device_error
  2. | `Directory_not_empty of string
  3. | `File_already_exists of string
  4. | `Format_not_recognised of string
  5. | `Is_a_directory of string
  6. | `No_directory_entry of string * string
  7. | `No_space
  8. | `Not_a_directory of string
  9. | `Unknown_error of string
]
type 'a io = 'a Lwt.t
type t
type id = B.t
val id : t -> id
val connect : id -> [ `Error of error | `Ok of t ] io
val disconnect : t -> unit io
type page_aligned_buffer = Cstruct.t
val read : t -> string -> int -> int -> [ `Error of error | `Ok of page_aligned_buffer list ] io
val size : t -> string -> [ `Error of error | `Ok of int64 ] io
type stat = {
  1. filename : string;
  2. read_only : bool;
  3. directory : bool;
  4. size : int64;
}
val format : t -> int64 -> [ `Error of error | `Ok of unit ] io
val create : t -> string -> [ `Error of error | `Ok of unit ] io
val mkdir : t -> string -> [ `Error of error | `Ok of unit ] io
val destroy : t -> string -> [ `Error of error | `Ok of unit ] io
val stat : t -> string -> [ `Error of error | `Ok of stat ] io
val listdir : t -> string -> [ `Error of error | `Ok of string list ] io
val write : t -> string -> int -> page_aligned_buffer -> [ `Error of error | `Ok of unit ] io
OCaml

Innovation. Community. Security.