package inotify
All checked builds passInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1d103e7dd32fddd0f1201b2d2f6c5b762548277bc173beef7b072f30ea89ccc4
sha512=660a44e3083f76f0342a6214ba9df4e18b42cc5da833cae3200345e5f0c5c353a3d67dace21ba00d3365d6866a82c90e5b732c9f8e3d9e38687239d6d0fe41f5
Description
Inotify bindings for OCaml
Added to opam-repository:
README
OCaml Inotify bindings 
This package contains bindings for Linux's filesystem monitoring interface, inotify.
Installation
The bindings are available via OPAM:
$ opam install inotifyAlternatively, you can do it manually:
# If you want to use lwt_inotify
$ opam install lwt
# If you want to use eio_inotify
$ opam install eio
$ opam install .Usage
Unix-style interface (findlib package inotify):
let inotify = Inotify.create () in
let watch = Inotify.add_watch inotify "dir" [Inotify.S_Create] in
print_endline (Inotify.string_of_event (List.hd (Inotify.read inotify)))
(* watch=1 cookie=0 events=CREATE "file" *)Lwt-style interface (findlib package inotify.lwt):
Lwt_main.run (
let%lwt inotify = Lwt_inotify.create () in
let%lwt watch = Lwt_inotify.add_watch inotify "dir" [Inotify.S_Create] in
let%lwt event = Lwt_inotify.read inotify in
Lwt_io.printl (Inotify.string_of_event event))
(* watch=1 cookie=0 events=CREATE "file" *)Eio-style interface (findlib package inotify-eio):
Eio_main.run @@ fun _env ->
let inotify = Eio_inotify.create () in
let _watch = Eio_inotify.add_watch inotify "dir" [Inotify.S_Create] in
let event = Eio_inotify.read inotify in
print_endline (Inotify.string_of_event event)
(* watch=1 cookie=0 events=CREATE "file" *)Note that Lwt-style & Eio-style interfaces returns events one-by-one, but the Unix-style one returns them in small batches.
Documentation
The API documentation is available at GitHub pages.
License
Dependencies (4)
-
ocaml
>= "4.03" - base-bytes
- base-unix
-
dune
>= "3.9"
Dev Dependencies (4)
Optional Dependencies (1)
Used by (5)
- async_inotify
- inotify-eio
- irmin-watcher
-
slipshow
< "0.0.33" | >= "0.3.0" - stone
Conflicts
None
Build status
Results of building inotify with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 2.6 (this version) | good | good | good | good | good |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure