-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
fileHandle.read argument defaults don’t seem to work #39034
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
Comments
|
This is IMO an issue with the docs. The For |
|
I can help with this! |
|
I want to work on this issue. |
PR-URL: #39163 Fixes: #39034 Reviewed-By: Nitzan Uziely <[email protected]> Reviewed-By: Qingyu Deng <[email protected]>
PR-URL: #39163 Fixes: #39034 Reviewed-By: Nitzan Uziely <[email protected]> Reviewed-By: Qingyu Deng <[email protected]>



fs/promisesWhat steps will reproduce the bug?
Save the above as
test.cjsand runnode test.cjs.How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
https://nodejs.org/api/fs.html#fs_filehandle_read_buffer_offset_length_position
Calling
fileHandle.read(buffer)should work likefileHandle.read(buffer, 0, buffer.byteLength).What do you see instead?
0 bytes are read.
Additional information
fs.readSynchas similar documentation and works as expected.Potential problems:
The text was updated successfully, but these errors were encountered: