Browse Source

doc: clarify eventType in fs.watch

'rename' is confusing, and it's not clear what "they" refers to.

Fixes: https://github.com/nodejs/node/issues/9082
PR-URL: https://github.com/nodejs/node/pull/9318
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
v6
Nikolai Vavilov 8 years ago
committed by Roman Reiss
parent
commit
b209a6e271
No known key found for this signature in database GPG Key ID: 2E62B41C93869443
  1. 8
      doc/api/fs.md

8
doc/api/fs.md

@ -1701,8 +1701,12 @@ The listener callback gets two arguments `(eventType, filename)`. `eventType` i
`'rename'` or `'change'`, and `filename` is the name of the file which triggered
the event.
Please note the listener callback is attached to the `'change'` event
fired by [`fs.FSWatcher`][], but they are not the same thing.
Note that on most platforms, `'rename'` is emitted whenever a filename appears
or disappears in the directory.
Also note the listener callback is attached to the `'change'` event fired by
[`fs.FSWatcher`][], but it is not the same thing as the `'change'` value of
`eventType`.
### Caveats

Loading…
Cancel
Save