package mirage-fs

  1. Overview
  2. Docs
On This Page
  1. Mirage_fs
Legend:
Library
Module
Module type
Parameter
Class
Class type

MirageOS signatures for filesystem devices

v3.0.1

  • deprecated This module will be retired with MirageOS 4.0, use Mirage_kv instead!

Mirage_fs

type error = [
  1. | `Is_a_directory
    (*

    Cannot read or write the contents of a directory

    *)
  2. | `No_directory_entry
    (*

    Cannot find a directory entry

    *)
  3. | `Not_a_directory
    (*

    Cannot create a directory entry in a file

    *)
]

The type for FS errors.

val pp_error : error Fmt.t

pp_error is the pretty-printer for errors.

type write_error = [
  1. | error
  2. | `File_already_exists
    (*

    Cannot create a file with a duplicate name

    *)
  3. | `No_directory_entry
    (*

    Something in the path doesn't exist

    *)
  4. | `No_space
    (*

    No space left on the block device

    *)
]

The type for FS write errors.

val pp_write_error : write_error Fmt.t

pp_write_error is the pretty-printer for write errors.

type stat = {
  1. filename : string;
    (*

    Filename within the enclosing directory

    *)
  2. read_only : bool;
    (*

    True means the contents are read-only

    *)
  3. directory : bool;
    (*

    True means the entity is a directory; false means a file

    *)
  4. size : int64;
    (*

    Size of the entity in bytes

    *)
}

The type for Per-file/directory statistics.

module type S = sig ... end
module To_KV_RO (FS : S) : sig ... end

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

OCaml

Innovation. Community. Security.