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
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