Skip to content

feat(node): implement FileHandle.readv() method#31943

Merged
Tango992 merged 2 commits intodenoland:mainfrom
AprilNEA:feat/filehandle-readv
Jan 24, 2026
Merged

feat(node): implement FileHandle.readv() method#31943
Tango992 merged 2 commits intodenoland:mainfrom
AprilNEA:feat/filehandle-readv

Conversation

@AprilNEA
Copy link
Copy Markdown
Contributor

Implements filehandle.readv(buffers[, position]) method for the FileHandle class in node:fs/promises.
This is part of #25554 tracking FileHandle missing methods.
References: Node.js docs: https://nodejs.org/api/fs.html#filehandlereadvbuffers-position

Changes

  • Added ReadVResult interface and readvPromise function in _fs_readv.ts
  • Added readv method to FileHandle class in handle.ts
  • Added unit tests for readv with and without position parameter

Adds the missing `readv` method to the FileHandle class in
node:fs/promises, which reads data into an array of ArrayBufferView
buffers.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 24, 2026

CLA assistant check
All committers have signed the CLA.

@AprilNEA AprilNEA force-pushed the feat/filehandle-readv branch from 616fbfe to 0c16fc9 Compare January 24, 2026 03:47
@bartlomieju bartlomieju requested a review from Tango992 January 24, 2026 11:31
Copy link
Copy Markdown
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

Are there Node compat tests that could be enabled with this change?

@AprilNEA
Copy link
Copy Markdown
Contributor Author

Are there Node compat tests that could be enabled with this change?

I think test-fs-readv-promises.js should cover this

Copy link
Copy Markdown
Contributor

@Tango992 Tango992 left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@Tango992 Tango992 merged commit a02d220 into denoland:main Jan 24, 2026
19 checks passed
nayeemrmn added a commit to nayeemrmn/deno that referenced this pull request Jan 26, 2026
@AprilNEA AprilNEA mentioned this pull request Feb 6, 2026
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants