From f0a75ab2d310e858bf3090c82667d60be9c7d401 Mon Sep 17 00:00:00 2001 From: Sakthipriyan Vairamani Date: Wed, 2 Sep 2015 14:54:24 +0530 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/2649 Fixes: https://github.com/nodejs/node/issues/375 Reviewed-By: rvagg - Rod Vagg Reviewed-By: silverwind - Roman Reiss --- doc/api/fs.markdown | 6 +++--- test/sequential/test-fs-watch-recursive.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index 9f885422c5a..643f9d9ea2c 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -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 diff --git a/test/sequential/test-fs-watch-recursive.js b/test/sequential/test-fs-watch-recursive.js index 0a18b94f56b..3e6e4b44f4e 100644 --- a/test/sequential/test-fs-watch-recursive.js +++ b/test/sequential/test-fs-watch-recursive.js @@ -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; @@ -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'); }