package async_inotify
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=6637d7324116c99173a162c75539b7cb92c937e1b2d08c97b4c6a0a0c743db61
md5=c7e91a9ef2f1c79dc41e978224a663fc
doc/async_inotify/Async_inotify/index.html
Module Async_inotify
module Event : sig ... end
type modify_event_selector = [
| `Any_change
(*Send a Modified event whenever the contents of the file changes (which can be very often when writing a large file)
*)| `Closed_writable_fd
(*Only send a Modify event when someone with a file descriptor with write permission to that file is closed. There are usually many fewer of these events (for large files), but they come later.
*)
]
val create :
?modify_event_selector:modify_event_selector ->
?recursive:bool ->
?watch_new_dirs:bool ->
string ->
(t * file_info list) Async.Deferred.t
create path
creates an inotify watching path. Returns the inotify type t itself and the list of files currently being watched. By default, recursively watches all subdirectories of the given path.
val create_empty :
modify_event_selector:modify_event_selector ->
t Async.Deferred.t
create_empty modify_event_selector
creates an inotify that watches nothing until add
or add_all
is called.
val stop : t -> unit Async.Deferred.t
stop t
stop watching t
val add : t -> string -> unit Async.Deferred.t
add t path
add the path to t to be watched
val add_all :
?skip_dir:((string * Async.Unix.Stats.t) -> bool Async.Deferred.t) ->
t ->
string ->
file_info list Async.Deferred.t
add_all t path
adds the path to t recursively
val remove : t -> string -> unit Async.Deferred.t
remove t path
remove the path from t