package inotify

  1. Overview
  2. Docs
Inotify bindings for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

inotify-2.6.tbz
sha256=1d103e7dd32fddd0f1201b2d2f6c5b762548277bc173beef7b072f30ea89ccc4
sha512=660a44e3083f76f0342a6214ba9df4e18b42cc5da833cae3200345e5f0c5c353a3d67dace21ba00d3365d6866a82c90e5b732c9f8e3d9e38687239d6d0fe41f5

doc/inotify.lwt/Lwt_inotify/index.html

Module Lwt_inotifySource

An Lwt wrapper for Inotify module.

Note, whenever it is possible we provide two version of an operation:

  • f' - a pure non-blocking operation;
  • f - the same operation lifted into the Lwt monad.
Sourcetype t

Type of inotify descriptors.

Sourceval create : unit -> t Lwt.t

create () returns a new inotify descriptor.

Sourceval create' : unit -> t
  • since 2.5
Sourceval add_watch : t -> string -> Inotify.selector list -> Inotify.watch Lwt.t

add_watch desc path events sets up desc to watch for events occuring to path, and returns a watch descriptor.

Sourceval add_watch' : t -> string -> Inotify.selector list -> Inotify.watch
  • since 2.5
Sourceval rm_watch : t -> Inotify.watch -> unit Lwt.t

rm_watch desc watch stops desc from watching watch.

Sourceval rm_watch' : t -> Inotify.watch -> unit
  • since 2.5

read desc waits for an event to occur at desc.

Sourceval try_read : t -> Inotify.event option Lwt.t

try_read desc returns Some event if desc has queued events, or None otherwise.

Sourceval close : t -> unit Lwt.t

close desc frees desc.

OCaml

Innovation. Community. Security.