package mirage-fs-mem

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

Module Mirage_fs_memSource

Sourcetype write_error = [
  1. | Mirage_fs.write_error
  2. | `Directory_not_empty
]
Sourcetype error = Mirage_fs.error
Sourcemodule Pure : sig ... end
include Mirage_fs_lwt.S with type write_error := write_error and type error := error
Sourceval pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

Sourceval pp_write_error : write_error Fmt.t

pp_write_error is the pretty-printer for write errors.

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

The type for potentially blocking I/O operation

Sourcetype t

The type representing the internal state of the device

Sourceval disconnect : t -> unit io

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

Sourcetype page_aligned_buffer = Cstruct.t

The type for memory buffers.

Sourceval read : t -> string -> int -> int -> (page_aligned_buffer list, error) 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.

Sourceval size : t -> string -> (int64, error) result io

Get the value size.

Sourceval create : t -> string -> (unit, write_error) result io

create t path creates an empty file at path. If path contains directories that do not yet exist, create will attempt to create them.

Sourceval mkdir : t -> string -> (unit, write_error) result io

mkdir t path creates an empty directory at path. If path contains intermediate directories that do not yet exist, mkdir will create them. If a directory already exists at path, mkdir returns `Ok () and takes no action.

Sourceval destroy : t -> string -> (unit, write_error) result io

destroy t path removes a path (which may be a file or an empty directory) on filesystem t.

Sourceval stat : t -> string -> (Mirage_fs.stat, error) result io

stat t path returns information about file or directory at path.

Sourceval listdir : t -> string -> (string list, error) result io

listdir t path returns the names of files and subdirectories within the directory path.

Sourceval write : t -> string -> int -> page_aligned_buffer -> (unit, write_error) result io

write t path offset data writes data at offset in file path on filesystem t.

If path contains directories that do not exist, write will attempt to create them. If path already exists, write will overwrite existing information starting at off.

Sourceval connect : string -> t Lwt.t
Sourceval pp : t Fmt.t
Sourceval equal : t -> t -> bool
OCaml

Innovation. Community. Security.