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

Support providing AbortSignal to the fs.stat functions #57751

Open
Nokel81 opened this issue Apr 4, 2025 · 0 comments
Open

Support providing AbortSignal to the fs.stat functions #57751

Nokel81 opened this issue Apr 4, 2025 · 0 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@Nokel81
Copy link

Nokel81 commented Apr 4, 2025

What is the problem this feature will solve?

Currently fs.stat does not support providing an AbortSignal to fail-fast during teardown, unlike basically all other fs operations

What is the feature you are proposing to solve the problem?

That the StatOptions object have a new field signal?: AbortSignal and when that signal emits an "abort" event the underlying OS FS actions is aborted an the callback parameter of stat is called with an AbortError and undefined.

Futhermore, the async version of stat would also support this option but instead would reject the promise with an AbortError.

What alternatives have you considered?

None, this needs to be implemented within the VM

@Nokel81 Nokel81 added the feature request Issues that request new features to be added to Node.js. label Apr 4, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Status: Awaiting Triage
Development

No branches or pull requests

1 participant