Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6483bc2

Browse filesBrowse files
TrottFishrock123
authored andcommitted
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: #2425 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
1 parent 850c794 commit 6483bc2
Copy full SHA for 6483bc2

File tree

Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-5
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.markdown‎

Copy file name to clipboardExpand all lines: doc/api/fs.markdown
+6-5Lines changed: 6 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -557,11 +557,12 @@ The synchronous version of `fs.appendFile`. Returns `undefined`.
557557
Watch for changes on `filename`. The callback `listener` will be called each
558558
time the file is accessed.
559559

560-
The second argument is optional. The `options` if provided should be an object
561-
containing two members a boolean, `persistent`, and `interval`. `persistent`
562-
indicates whether the process should continue to run as long as files are
563-
being watched. `interval` indicates how often the target should be polled,
564-
in milliseconds. The default is `{ persistent: true, interval: 5007 }`.
560+
The `options` argument may be omitted. If provided, it should be an object. The
561+
`options` object may contain a boolean named `persistent` that indicates
562+
whether the process should continue to run as long as files are being watched.
563+
The `options` object may specify an `interval` property indicating how often the
564+
target should be polled in milliseconds. The default is
565+
`{ persistent: true, interval: 5007 }`.
565566

566567
The `listener` gets two arguments the current stat object and the previous
567568
stat object:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.