File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -745,6 +745,9 @@ Returns a new ReadStream object (See `Readable Stream`).
745745the file instead of the entire file. Both ` start ` and ` end ` are inclusive and
746746start at 0. The ` encoding ` can be ` 'utf8' ` , ` 'ascii' ` , or ` 'base64' ` .
747747
748+ If ` fd ` is specified, ` ReadStream ` will ignore the ` path ` argument and will use
749+ the specified file descriptor. This means that no ` open ` event will be emitted.
750+
748751If ` autoClose ` is false, then the file descriptor won't be closed, even if
749752there's an error. It is your responsibility to close it and make sure
750753there's no file descriptor leak. If ` autoClose ` is set to true (default
@@ -775,13 +778,19 @@ Returns a new WriteStream object (See `Writable Stream`).
775778
776779 { flags: 'w',
777780 encoding: null,
781+ fd: null,
778782 mode: 0666 }
779783
780784` options ` may also include a ` start ` option to allow writing data at
781785some position past the beginning of the file. Modifying a file rather
782786than replacing it may require a ` flags ` mode of ` r+ ` rather than the
783787default mode ` w ` .
784788
789+ Like ` ReadStream ` above, if ` fd ` is specified, ` WriteStream ` will ignore the
790+ ` path ` argument and will use the specified file descriptor. This means that no
791+ ` open ` event will be emitted.
792+
793+
785794## Class: fs.WriteStream
786795
787796` WriteStream ` is a [ Writable Stream] ( stream.html#stream_class_stream_writable ) .
You can’t perform that action at this time.
0 commit comments