Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify arguments on fs.create{Read|Write}Stream #2023

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
6 changes: 4 additions & 2 deletions doc/api/fs.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ on Unix systems, it never was.

Returns a new ReadStream object (See `Readable Stream`).

`options` is an object or string with the following defaults:
`options` is an object (except function) or string with the following defaults:

{ flags: 'r',
encoding: null,
Expand Down Expand Up @@ -823,6 +823,8 @@ An example to read the last 10 bytes of a file which is 100 bytes long:

If `options` is a string, then it specifies the encoding.

fs.createReadStream('sample.txt', 'utf8');

## Class: fs.ReadStream

`ReadStream` is a [Readable Stream](stream.html#stream_class_stream_readable).
Expand All @@ -838,7 +840,7 @@ Emitted when the ReadStream's file is opened.

Returns a new WriteStream object (See `Writable Stream`).

`options` is an object or string with the following defaults:
`options` is an object (except function) or string with the following defaults:

{ flags: 'w',
encoding: null,
Expand Down