Support providing AbortSignal to the fs.stat
functions
#57751
Labels
feature request
Issues that request new features to be added to Node.js.
fs.stat
functions
#57751
What is the problem this feature will solve?
Currently
fs.stat
does not support providing anAbortSignal
to fail-fast during teardown, unlike basically all other fs operationsWhat is the feature you are proposing to solve the problem?
That the
StatOptions
object have a new fieldsignal?: AbortSignal
and when that signal emits an"abort"
event the underlying OS FS actions is aborted an the callback parameter ofstat
is called with anAbortError
andundefined
.Futhermore, the async version of
stat
would 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
The text was updated successfully, but these errors were encountered: