Skip to content

Commit c73c2d0

Browse files
committed
fs: add stream method on FileHandle
Fixes: nodejs#38350
1 parent 9f5977a commit c73c2d0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/internal/fs/promises.js

+11
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const { kUsePromises } = binding;
9292
const {
9393
JSTransferable, kDeserialize, kTransfer, kTransferList
9494
} = require('internal/worker/js_transferable');
95+
const Writable = require('internal/streams/writable');
9596

9697
const getDirectoryEntriesPromise = promisify(getDirents);
9798
const validateRmOptionsPromise = promisify(validateRmOptions);
@@ -133,6 +134,16 @@ class FileHandle extends EventEmitterMixin(JSTransferable) {
133134
return fsCall(fdatasync, this);
134135
}
135136

137+
/**
138+
* @param {Writable} dst Refs to stream.pipeline destination
139+
* @param {Object} options
140+
* @param {Number} [options.start=0]
141+
* @param {Number} [options.end]
142+
* @param {Object} [options.signal]
143+
*/
144+
stream (dst, options) {
145+
}
146+
136147
sync() {
137148
return fsCall(fsync, this);
138149
}

0 commit comments

Comments
 (0)