package irmin-fs

  1. Overview
  2. Docs
Generic file-system backend for Irmin

Install

Dune Dependency

Authors

Maintainers

Sources

irmin-3.3.2.tbz
sha256=95a87ecc3dc2b35eee56cb351c32d2bd78c8967180a4b028324d815bfce1a6ff
sha512=20faba561c80c5389e91993d7e2cc0cedd1330cf098b68f0456f5068cde369a5589a05cd2aeb0a701d65a7d1e1e6f4045ccfbf60349cbea2bfd02981d7bb244c

doc/irmin-fs/Irmin_fs/KV/argument-1-IO/index.html

Parameter KV.IO

File-system abstractions

type path = string

The type for paths.

Read operations

val rec_files : path -> string list Lwt.t

rec_files dir is the list of files recursively present in dir and all of its sub-directories. Return filenames prefixed by dir.

val file_exists : path -> bool Lwt.t

file_exist f is true if f exists.

val read_file : path -> string option Lwt.t

Read the contents of a file using mmap.

Write Operations

val mkdir : path -> unit Lwt.t

Create a directory.

type lock

The type for file locks.

val lock_file : path -> lock

lock_file f is the lock associated to the file f.

val write_file : ?temp_dir:path -> ?lock:lock -> path -> string -> unit Lwt.t

Atomic writes.

val test_and_set_file : ?temp_dir:string -> lock:lock -> path -> test:string option -> set:string option -> bool Lwt.t

Test and set.

val remove_file : ?lock:lock -> path -> unit Lwt.t

Remove a file or directory (even if non-empty).

OCaml

Innovation. Community. Security.