package irmin-watcher

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

Watchdog functions. Ensure that only one background process is monitoring events for a given directory.

type t

The type for filesystem watchdogs.

val callback : t -> Callback.t

callback t is t's callback table.

type hook = (string -> unit Lwt.t) -> (unit -> unit) Lwt.t

The type for watchdog hook.

val empty : unit -> t

empty () is the empty watchdog, monitoring no directory.

val clear : t -> unit

clear () stops all the currently active watchdogs.

val start : t -> dir:string -> hook -> unit Lwt.t

start t ~dir h adds a new callback hook on the directory dir, starting a new watchdog if needed otherwise re-using the previous one.

val stop : t -> dir:string -> unit

stop t ~dir stops the filesystem watchdog on directory dir (if any).

OCaml

Innovation. Community. Security.