-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(fslib): correct the FileHandle
implementation
#3889
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@merceyz I got an error like const handle = await fs.promises.open(filepath, 'r');
const { size } = await handle.stat(); And that number seems to be the file handle's fd number. I assume it will be fixed by this PR as well? |
1 task
cc04d53
to
0987811
Compare
@Josh-Cena Yes |
FileHandle
functions to their fd counterpartFileHandle
implementation
d606f76
to
40186c3
Compare
40186c3
to
0dfe5ff
Compare
54a9b32
to
14378ba
Compare
This comment was marked as spam.
This comment was marked as spam.
14378ba
to
00fa18c
Compare
496794c
to
b5866f5
Compare
b5866f5
to
52c133f
Compare
52c133f
to
8e2c498
Compare
merceyz
added a commit
that referenced
this pull request
Jul 20, 2022
* fix(fslib): map `FileHandle` functions to their fd counterpart * fix: `FileHandle.write` * refactor: avoid needing tslib update * test: `FileHandle.read` * test: `FileHandle.readFile` * test: `FileHandle.appendFile` * fix: `FileHandle.writeFile` * refactor: use symbols for internals * fix: ref counter * fix: throw when when using a closed FileHandle * fix: handle passing `FileHandle` to `fs.promises` functions * fix: `FileHandle.writev` * fix: `FileHandle.truncate` * fix: `FileHandle.chmod` * chore: versions * chore: changelog * chore: install
3 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the problem this PR addresses?
The patched filesystem doesn't implement
FileHandle
correctly.writev
method in patched FileHandle implementation #2083filehandle.truncate(len)
broken usingyarn node
#4372Depends on
fchmod
support #4466ftruncate
support #4477How did you fix it?
Implemented most of the
FileHandle
methods.Checklist