Skip to content

Commit c5f2405

Browse files
fansworld-claudiorvagg
fansworld-claudio
authored andcommitted
docs: fs - change links to buffer encoding to Buffer class anchor
PR-URL: #2796 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent fcb06af commit c5f2405

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/fs.markdown

+3-3
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ default value of 64 kb for the same parameter.
814814

815815
`options` can include `start` and `end` values to read a range of bytes from
816816
the file instead of the entire file. Both `start` and `end` are inclusive and
817-
start at 0. The `encoding` can be `'utf8'`, `'ascii'`, or `'base64'`.
817+
start at 0. The `encoding` can be any one of those accepted by [Buffer][].
818818

819819
If `fd` is specified, `ReadStream` will ignore the `path` argument and will use
820820
the specified file descriptor. This means that no `open` event will be emitted.
@@ -859,8 +859,7 @@ Returns a new WriteStream object (See `Writable Stream`).
859859
`options` may also include a `start` option to allow writing data at
860860
some position past the beginning of the file. Modifying a file rather
861861
than replacing it may require a `flags` mode of `r+` rather than the
862-
default mode `w`. The `defaultEncoding` can be `'utf8'`, `'ascii'`, `binary`,
863-
or `'base64'`.
862+
default mode `w`. The `defaultEncoding` can be any one of those accepted by [Buffer][].
864863

865864
Like `ReadStream` above, if `fd` is specified, `WriteStream` will ignore the
866865
`path` argument and will use the specified file descriptor. This means that no
@@ -910,3 +909,4 @@ Emitted when an error occurs.
910909
[fs.access]: #fs_fs_access_path_mode_callback
911910
[fs.statSync]: #fs_fs_statsync_path
912911
[fs.accessSync]: #fs_fs_accesssync_path_mode
912+
[Buffer]: buffer.html#buffer_buffer

0 commit comments

Comments
 (0)