Skip to content

Commit

Permalink
doc,test: enable recursive file watching in Windows
Browse files Browse the repository at this point in the history
Recursive file watching is supported by libuv since 1.7.0. Refer
https://github.com/nodejs/node/blob/master/deps/uv/ChangeLog#L126. This
patch notes that in the docs and enables testing this feature. It also
adds proper TAP plugin parsable message for other platforms.

PR-URL: #2649
Fixes: #375
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: silverwind - Roman Reiss <me@silverwind.io>
  • Loading branch information
thefourtheye authored and rvagg committed Sep 6, 2015
1 parent d3178d8 commit 7038388
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,9 @@ 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. Only FSEvents supports this
type of file watching so it is unlikely any additional platforms will be added
soon.
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.

#### Availability

Expand Down
4 changes: 3 additions & 1 deletion test/sequential/test-fs-watch-recursive.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var assert = require('assert');
var path = require('path');
var fs = require('fs');

if (process.platform === 'darwin') {
if (process.platform === 'darwin' || common.isWindows) {
var watchSeenOne = 0;

var testDir = common.tmpDir;
Expand Down Expand Up @@ -46,4 +46,6 @@ if (process.platform === 'darwin') {
setTimeout(function() {
fs.writeFileSync(filepathOne, 'world');
}, 10);
} else {
console.log('1..0 # Skipped: recursive option is darwin/windows specific');
}

0 comments on commit 7038388

Please sign in to comment.