16 lines
317 B
OCaml
16 lines
317 B
OCaml
open Lwt.Syntax
|
|
|
|
let watch_changes path =
|
|
let* notify = Lwt_inotify.create () in
|
|
let* _watch =
|
|
Lwt_inotify.add_watch notify path
|
|
[
|
|
Inotify.S_Create;
|
|
Inotify.S_Close_write;
|
|
Inotify.S_Modify;
|
|
Inotify.S_Move;
|
|
Inotify.S_Delete;
|
|
]
|
|
in
|
|
Lwt_inotify.read notify
|