package irmin-watcher

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

Dispatch listening functions.

type t

The type for callback tables.

val empty : unit -> t

create () is the empty callback table.

val clear : t -> unit

clear t clears the contents of the callback table t. All previous callbacks are discarded.

val stats : t -> dir:string -> int

stats t ~dir is the number of active callbacks registered for the directory dir.

val apply : t -> dir:string -> file:string -> unit Lwt.t

apply t ~dir ~file calls f file for every callback f registered for the directory dir.

val add : t -> id:int -> dir:string -> (string -> unit Lwt.t) -> unit

add t ~id ~dir f adds a new callback f to the directory dir, using the unique identifier id.

val remove : t -> id:int -> dir:string -> unit

remove t ~id ~dir removes the callback with ID id on the directory dir.

OCaml

Innovation. Community. Security.