Skip to content

Commit

Permalink
doc: copyedit fs.watch() information
Browse files Browse the repository at this point in the history
Removed "Only FSEvents supports this type of file watching so it is
unlikely any additional platforms will be added soon."

Per @saghul, "FSEvents" refers to the OSX API, but since we added
Windows support it may not be  unlikely that we add more.

PR-URL: #3097
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
  • Loading branch information
Trott authored and rvagg committed Oct 2, 2015
1 parent 7a58157 commit 928166c
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -633,9 +633,7 @@ the event.
The `fs.watch` API is not 100% consistent across platforms, and is
unavailable in some situations.

The recursive option is currently supported on OS X and Windows. Only FSEvents
supports this type of file watching so it is unlikely any additional platforms
will be added soon.
The recursive option is only supported on OS X and Windows.

#### Availability

Expand All @@ -662,11 +660,10 @@ less reliable.

<!--type=misc-->

Providing `filename` argument in the callback is not supported
on every platform (currently it's only supported on Linux and Windows). Even
on supported platforms `filename` is not always guaranteed to be provided.
Therefore, don't assume that `filename` argument is always provided in the
callback, and have some fallback logic if it is null.
Providing `filename` argument in the callback is only supported on Linux and
Windows. Even on supported platforms, `filename` is not always guaranteed to
be provided. Therefore, don't assume that `filename` argument is always
provided in the callback, and have some fallback logic if it is null.

fs.watch('somedir', function (event, filename) {
console.log('event is: ' + event);
Expand Down

0 comments on commit 928166c

Please sign in to comment.