Skip to content
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

fix(ext/node): add fs.promises.fstat and FileHandle#stat #26719

Merged
merged 12 commits into from
Nov 25, 2024

Conversation

manzt
Copy link
Contributor

@manzt manzt commented Nov 4, 2024

Fixes #23301

Implements FileHandle.stat. This PR also adds a promisified fs.fstat under 'fs/promises', which is used internally by FileHandle.stat.

part of #25554

@manzt manzt force-pushed the manzt/fstat-promise branch 5 times, most recently from bd5b907 to bc98058 Compare November 4, 2024 18:09
@manzt manzt changed the title feat(ext/node): Implement FileHandle#stat feat(ext/node): Promisify fstat and implement FileHandle#stat Nov 4, 2024
@manzt
Copy link
Contributor Author

manzt commented Nov 4, 2024

Oops, seeing #24391. Feel free to close. Although, I don't think that PR handles checking the whether the file is open prior to executing the fs operations. Probably should use the fsCall wrapper.

@kt3k kt3k changed the title feat(ext/node): Promisify fstat and implement FileHandle#stat fix(ext/node): add fs.promises.fstat and FileHandle#stat Nov 25, 2024
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

Sorry for the initial confusing comment. This now looks good to me. Nice work!

@kt3k kt3k merged commit 6b7e4c3 into denoland:main Nov 25, 2024
17 checks passed
bartlomieju pushed a commit that referenced this pull request Nov 28, 2024
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.

Node FileHandle#stat() not implemented
2 participants