diff options
author | Rich Trott <rtrott@gmail.com> | 2015-08-18 08:38:20 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2015-08-18 11:07:16 -0700 |
commit | 3ba9793d53b44ef44e995ec616301e144bc475a7 (patch) | |
tree | ce006adc8e2bf175670c27fbb3ff1c49c30a97bd /doc | |
parent | 522f8a8071f430e099785bce86da489a294df8a0 (diff) | |
download | android-node-v8-3ba9793d53b44ef44e995ec616301e144bc475a7.tar.gz android-node-v8-3ba9793d53b44ef44e995ec616301e144bc475a7.tar.bz2 android-node-v8-3ba9793d53b44ef44e995ec616301e144bc475a7.zip |
doc: clarify options for fs.watchFile()
The explanation for the `options` argument to `fs.watchFile()` had
missing punctuation. I took the opportunity to try to rewrite the
paragraph for greater clarity.
PR-URL: https://github.com/nodejs/node/pull/2425
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/fs.markdown | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/api/fs.markdown b/doc/api/fs.markdown index ebc2046d76..c9fd846681 100644 --- a/doc/api/fs.markdown +++ b/doc/api/fs.markdown @@ -557,11 +557,12 @@ The synchronous version of `fs.appendFile`. Returns `undefined`. Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed. -The second argument is optional. The `options` if provided should be an object -containing two members a boolean, `persistent`, and `interval`. `persistent` -indicates whether the process should continue to run as long as files are -being watched. `interval` indicates how often the target should be polled, -in milliseconds. The default is `{ persistent: true, interval: 5007 }`. +The `options` argument may be omitted. If provided, it should be an object. The +`options` object may contain a boolean named `persistent` that indicates +whether the process should continue to run as long as files are being watched. +The `options` object may specify an `interval` property indicating how often the +target should be polled in milliseconds. The default is +`{ persistent: true, interval: 5007 }`. The `listener` gets two arguments the current stat object and the previous stat object: |