Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixup! fs: add stream utilities to FileHandle
Co-authored-by: James M Snell <jasnell@gmail.com>
  • Loading branch information
aduh95 and jasnell committed Sep 8, 2021
commit ffd161bf40034e12662906fc64e1ff3fae27d03c
8 changes: 4 additions & 4 deletions lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class FileHandle extends EventEmitterMixin(JSTransferable) {

/**
* @typedef {import('./streams').ReadStream
* } NodeJSReadStream
* } ReadStream
* @param {{
* encoding?: string;
* autoClose?: boolean;
Expand All @@ -269,7 +269,7 @@ class FileHandle extends EventEmitterMixin(JSTransferable) {
* end?: number;
* highWaterMark?: number;
* }} [options]
* @returns {NodeJSReadStream}
* @returns {ReadStream}
*/
Comment thread
aduh95 marked this conversation as resolved.
createReadStream(options = undefined) {
const { ReadStream } = lazyFsStreams();
Expand All @@ -278,14 +278,14 @@ class FileHandle extends EventEmitterMixin(JSTransferable) {

/**
* @typedef {import('./streams').WriteStream
* } NodeJSWriteStream
* } WriteStream
* @param {{
* encoding?: string;
* autoClose?: boolean;
* emitClose?: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove autoClose & emitClose from here?

* start: number;
* }} [options]
* @returns {NodeJSWriteStream}
* @returns {WriteStream}
*/
Comment thread
aduh95 marked this conversation as resolved.
createWriteStream(options = undefined) {
const { WriteStream } = lazyFsStreams();
Expand Down