You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#66484 added mkstemp and mkstempSync, which return an object with path and handle methods. These require manual cleanup:
The file is not removed automatically. It is the caller's responsibility to close the {FileHandle} and to remove the file when it is no longer needed.
What is the feature you are proposing to solve the problem?
That object should have a Symbol.dispose method which removes the file when invoked.
As the PR says:
a disposable variant in the style of fs.mkdtempDisposableSync(). I would leave it for a follow-up, to keep this PR to the plain API.
But mkdtempDisposableSync needed to be a separate API, because it mkdtempDisposable returns a bare string. Here it's returning an object and so could be disposable directly, no need for a new API.
Activity