Idea: We could use a higher-level approach to discourage bad behaviour.
I guess it could be useful for when you want to semantically group all the temp directory usage in one directory for easier manual cleanup.
Something like:
import {tempDirectory} from 'tempy';
const root = temporaryDirectory();
const tempFile = root.temporaryFile();
import {temporaryDirectoryTask} from 'tempy';
temporaryDirectoryTask(root => {
root.temporaryFileTask(tempFile => {
});
})
Perhaps we could call them temporaryDirectoryContext
and temporaryDirectoryContextTask
? Perhaps we only need the latter?
Context: #35 (comment)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too