package irmin-fs

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

Install

Dune Dependency

Authors

Maintainers

Sources

irmin-3.11.0.tbz
sha256=09996fbcc2c43e117a9bd8e9028c635e81cccb264d5e02d425ab8b06bbacdbdb
sha512=0391a6bf7b94a1edd50a3a8df9e58961739fa78d7d689d61f56bc87144483bad2ee539df595c33d9d52c29b3458da5dddf3a73b5eb85e49c4667c26d2cd46be1

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.