From 5cc948b77a1452cdd8b667978c3cc1188b433b1a Mon Sep 17 00:00:00 2001 From: Alec Larson Date: Mon, 9 Apr 2018 15:00:18 -0400 Subject: [PATCH] fs: add 'close' event to FSWatcher PR-URL: https://github.com/nodejs/node/pull/19900 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Matteo Collina Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca --- doc/api/fs.md | 7 +++++++ lib/fs.js | 5 +++++ test/parallel/test-fs-watch.js | 1 + 3 files changed, 13 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 69138b6ac48..bf4261c15cd 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -329,6 +329,13 @@ added: v0.5.8 Emitted when an error occurs while watching the file. +### Event: 'close' + + +Emitted when the watcher stops watching for changes. + ### watcher.close()