-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat: implement createReadStream
and createWriteStream
on FileHandle
#1076
base: master
Are you sure you want to change the base?
Conversation
Well, that's embarrassing: the first version of this that I submitted didn't work, due to another issue: the In my second commit, I've aligned that behavior with the Node API (which makes my first commit work), and in my third commit, I've added a test for this. Let me know if you want me to rebase, or handle any of this differently. |
createReadStream
and createWriteStream
on FileHandle
would you be ok doing a dedicated PR for that? it sounds like it's a clean bugfix that can get its own version and changelog entry |
Done: #1077 I'll wait for that to be merged then rebase this. |
21f729d
to
c550f22
Compare
Rebased! |
@@ -33,6 +33,14 @@ export class FileHandle implements IFileHandle { | |||
return promisify(this.fs, 'fdatasync')(this.fd); | |||
} | |||
|
|||
createReadStream(options: opts.IFileHandleReadStreamOptions): IReadStream { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to get some basic tests for these?
Closes #1063
Thanks for making this library! My test needed these methods to exist so I took a stab at adding support.