Skip to content

Commit 402bf37

Browse files
thefourtheyervagg
authored andcommitted
doc,test: enable recursive file watching in Windows
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 <[email protected]> Reviewed-By: silverwind - Roman Reiss <[email protected]>
1 parent 45c1c4f commit 402bf37

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/api/fs.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,9 @@ the event.
625625
The `fs.watch` API is not 100% consistent across platforms, and is
626626
unavailable in some situations.
627627

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

632632
#### Availability
633633

test/sequential/test-fs-watch-recursive.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var assert = require('assert');
44
var path = require('path');
55
var fs = require('fs');
66

7-
if (process.platform === 'darwin') {
7+
if (process.platform === 'darwin' || common.isWindows) {
88
var watchSeenOne = 0;
99

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

0 commit comments

Comments
 (0)