Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

doc: fix minor typos and grammar in fs docs #7431

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ File I/O is provided by simple wrappers around standard POSIX functions. To
use this module do `require('fs')`. All the methods have asynchronous and
synchronous forms.

The asynchronous form always take a completion callback as its last argument.
The asynchronous form always takes a completion callback as its last argument.
The arguments passed to the completion callback depend on the method, but the
first argument is always reserved for an exception. If the operation was
completed successfully, then the first argument will be `null` or `undefined`.
Expand Down Expand Up @@ -59,8 +59,8 @@ In busy processes, the programmer is _strongly encouraged_ to use the
asynchronous versions of these calls. The synchronous versions will block
the entire process until they complete--halting all connections.

Relative path to filename can be used, remember however that this path will be
relative to `process.cwd()`.
The relative path to a filename can be used. Remember, however, that this path
will be relative to `process.cwd()`.

Most fs functions let you omit the callback argument. If you do, a default
callback is used that ignores errors, but prints a deprecation
Expand Down Expand Up @@ -494,11 +494,11 @@ The synchronous version of `fs.appendFile`.
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 second argument is optional. The `options`, if provided, should be an object
containing two members: a boolean, `persistent`, and an integer, `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 `listener` gets two arguments the current stat object and the previous
stat object:
Expand All @@ -510,7 +510,7 @@ stat object:

These stat objects are instances of `fs.Stat`.

If you want to be notified when the file was modified, not just accessed
If you want to be notified when the file was modified, not just accessed,
you need to compare `curr.mtime` and `prev.mtime`.

## fs.unwatchFile(filename, [listener])
Expand Down