Up

module Async_inotify

: sig
#
type t
#
type file_info = string * Async.Std.Unix.Stats.t
#
module Event : sig
#
type move =
# | Away of string
# | Into of string
# | Move of string * string
#
type t =
# | Created of string
# | Unlinked of string
# | Modified of string
# | Moved of move
# | Queue_overflow
#
val to_string : t -> string
end
#
val create : ?recursive:bool -> ?watch_new_dirs:bool -> string -> (t * file_info list) Async.Std.Deferred.t

create path create 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 stop : t -> unit Async.Std.Deferred.t

stop t stop watching t

#
val add : t -> string -> unit Async.Std.Deferred.t

add t path add the path to t to be watched

#
val add_all : ?skip_dir:(string * Async.Std.Unix.Stats.t -> bool Async.Std.Deferred.t) -> t -> string -> file_info list Async.Std.Deferred.t

add_all t path adds the path to t recursively

#
val remove : t -> string -> unit Async.Std.Deferred.t

remove t path remove the path from t

#
val stream : t -> Event.t Async.Std.Stream.t

stream t returns a stream of filesystem events

#
val pipe : t -> Event.t Async.Std.Pipe.Reader.t

pipe t returns a pipe of filesystem events

end