package inotify
Inotify bindings for OCaml
Install
Dune Dependency
github.com
Readme
Changelog
LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (10)
Authors
Maintainers
Sources
inotify-2.5.tbz
sha256=829aec332ccb46f61876b23c38059afcf7802516d3697c1aa15e1916be72114b
sha512=3dea21ae119cb9c524e9b4a2d3b324d8d46df41bda57c32b11563802646ac2be37b76f629f0c5fd8fc3635684feea8f1abaf7d4efd8b2b5c3618a5d935aa94b1
Description
Inotify bindings for OCaml
Published: 22 Nov 2023
README
OCaml Inotify bindings
This package contains bindings for Linux's filesystem monitoring interface, inotify.
Installation
The bindings are available via OPAM:
$ opam install inotify
Alternatively, you can do it manually:
# If you want to lwt_inotify
$ opam install lwt
$ 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" *)
Note that Lwt-style interface 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
>= "2.9"
Dev Dependencies (4)
Used by (5)
-
async_inotify
>= "111.17.00"
-
irmin-watcher
>= "0.4.0"
-
slipshow
< "0.0.33"
-
stone
>= "0.4.0"
- xapi-rrdd
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page