2 * Copyright (c) 2015, Facebook, Inc.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
10 exception Error
of string * Unix.error
12 (* Contains all the fsevents context *)
15 (* A subscription to events for a directory *)
19 path
: string; (* The full path for the file/directory that changed *)
20 wpath
: string; (* The watched path that triggered this event *)
23 val init
: string list
-> env
25 (* Returns None if we're already watching that path and Some watch otherwise *)
26 val add_watch
: env
-> string -> watch
option
28 (* A file descriptor and what to do when it is selected *)
29 type fd_select
= Unix.file_descr
* (unit -> unit)
31 (* The fsevents context *)
33 (* Additional file descriptor to select for reading *)
34 ?read_fdl
:(fd_select list
) ->
35 (* Additional file descriptor to select for writing *)
36 ?write_fdl
:(fd_select list
) ->
37 (* Timeout...like Unix.select *)
39 (* The callback for file system events *)
40 (event list
-> unit) ->