fs: make unwatchFile() remove a specific listener
authorBen Noordhuis <info@bnoordhuis.nl>
Sun, 8 Jul 2012 14:31:07 +0000 (16:31 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 9 Jul 2012 13:48:43 +0000 (15:48 +0200)
commit5b5362aa8d80d0822f37e2448d024452dd3c0a98
treea26aa6b3da32fcf3f8b54d6051894b857bc9216e
parentbf539f9bfd2cde4c18557f2607455a4f44fc1565
fs: make unwatchFile() remove a specific listener

Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`.

The function is overloaded now: `fs.unwatchFile(path)` still removes all
listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener.

Fixes #3660.
doc/api/fs.markdown
lib/fs.js
test/pummel/test-fs-watch-file.js