Support providing AbortSignal to the `fs.stat` functions
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 122k
- Forks
- 37.3k
- Ø Merge
- 4 T. 2 Std.
- Gemergte PRs (30 T.)
- 283
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Einstiegspunkte von fs.stat und StatOptions zu finden, und vergleiche anschließend, wie bestehende fs-Operationen AbortSignal akzeptieren und AbortError weitergeben. Als erledigt gilt die Aufgabe, wenn stat auf Callback-Basis nach einem Abbruch AbortError und undefined zurückgibt, während die Promise-basierte Version mit AbortError abgelehnt wird und die zugrunde liegende Dateisystemaktion beendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, nodejs
- Bereich
- backend-api-design, operating-systems
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100