-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
Support providing AbortSignal to the fs.stat functions #57751
Copy link
Copy link
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Awaiting Triage
What is the problem this feature will solve?
Currently
fs.statdoes not support providing anAbortSignalto fail-fast during teardown, unlike basically all other fs operationsWhat is the feature you are proposing to solve the problem?
That the
StatOptionsobject have a new fieldsignal?: AbortSignaland when that signal emits an"abort"event the underlying OS FS actions is aborted an the callback parameter ofstatis called with anAbortErrorandundefined.Futhermore, the async version of
statwould also support this option but instead would reject the promise with anAbortError.What alternatives have you considered?
None, this needs to be implemented within the VM