package datakit-server

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

Error codes.

type err = {
  1. errno : int32 option;
  2. descr : string;
}

The type for generic errors.

type t =
  1. | Noent
    (*

    No such file or directory.

    *)
  2. | Isdir
    (*

    The entry is a directory.

    *)
  3. | Notdir
    (*

    The entry is not a directory.

    *)
  4. | Read_only_file
    (*

    The file is read-only.

    *)
  5. | Perm
    (*

    The operation is not permitted.

    *)
  6. | Other of err
    (*

    Generic error function.

    *)

The type for FS errors.

module Infix : sig ... end

Infix operators.

val no_entry : ('a, t) Result.result

no_entry is Error Noent.

val is_dir : ('a, t) Result.result

is_dir is Error Isdir.

val not_dir : ('a, t) Result.result

not_dir is Error Notdir.

val read_only_file : ('a, t) Result.result

read_only_file is Error Read_only_file.

val perm : ('a, t) Result.result

perm is Error Perm.

val other : ?errno:int32 -> ('a, unit, string, ('b, t) Result.result) Pervasives.format4 -> 'a

Other ~errno descr is Error { errno; descr }. errno is 0 if not set.

val negative_offset : int64 -> ('a, t) Result.result

negative_offset o is an error saying that o is negative.

val offset_too_large : offset:int64 -> int64 -> ('a, t) Result.result

offset_too_large ~offset len is an error saying that offset is beyond the end of the file (len).

val pp : t Fmt.t
OCaml

Innovation. Community. Security.