Check argument to 'unset' in reactive mode
[hiphop-php.git] / hphp / hack / src / fsnotify_win / fsnotify.mli
blob373a323b387a8cfcd991e59ba400e3515be62788
1 (**
2 * Copyright (c) 2015, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 exception Error of string * Unix.error
12 (* Contains all the fsevents context *)
13 type env
15 (* A subscription to events for a directory *)
16 type watch
18 type event = {
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)
30 val select :
31 (* The fsevents context *)
32 env ->
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 *)
38 timeout:float ->
39 (* The callback for file system events *)
40 (event list -> unit) ->
41 unit