package eio

  1. Overview
  2. Docs
Effect-based direct-style IO API for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

eio-1.4.tbz
sha256=ba11ad486f492130dbb486f2b3bdc4905643f10016806ddf86e9a34e4346aaa5
sha512=57ef2c137ccdc26d8029e636b6a4ee92da7c6b2f35954946bd56ca595d6947a8ec42f6f83f8552f73d6719e6ce2314cae2e2fad1686a387522935e6f90e9a8d9

doc/eio/Eio/Fs/index.html

Module Eio.FsSource

File-system types.

Note: file-system operations, such as opening or deleting files, can be found in the Path module.

Types

Sourcetype path = string
Sourcetype error =
  1. | Already_exists of Exn.Backend.t
  2. | Not_found of Exn.Backend.t
  3. | Permission_denied of Exn.Backend.t
  4. | File_too_large
  5. | Not_native of string
    (*

    Raised by Path.native_exn.

    *)
Sourcetype Exn.err +=
  1. | E of error
Sourceval err : error -> exn
Sourcetype create = [
  1. | `Never
    (*

    fail if the named file doesn't exist

    *)
  2. | `If_missing of File.Unix_perm.t
    (*

    create if file doesn't already exist

    *)
  3. | `Or_truncate of File.Unix_perm.t
    (*

    any existing file is truncated to zero length

    *)
  4. | `Exclusive of File.Unix_perm.t
    (*

    always create; fail if the file already exists

    *)
]

When to create a new file.

If a new file is created, the given permissions are used for it.

Sourcetype dir_ty = [
  1. | `Dir
]
Sourcetype 'a dir = ([> dir_ty ] as 'a) Std.r

Note: use the functions in Path to access directories.

Provider Interface

Sourcemodule Pi : sig ... end