Skip to content

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

Merged
kt3k merged 12 commits intodenoland:mainfrom
manzt:manzt/fstat-promise
Nov 25, 2024
Merged

fix(ext/node): add fs.promises.fstat and FileHandle#stat#26719
kt3k merged 12 commits intodenoland:mainfrom
manzt:manzt/fstat-promise

Conversation

@manzt
Copy link
Copy Markdown
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 force-pushed the manzt/fstat-promise branch from e3b22c0 to e369177 Compare November 4, 2024 18:18
@manzt manzt force-pushed the manzt/fstat-promise branch from e369177 to a70a10c Compare November 4, 2024 18:22
@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
Copy Markdown
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
Copy Markdown
Contributor

@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
bartlomieju pushed a commit that referenced this pull request Nov 28, 2024
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
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