-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
On more than one occasion, I've wanted to create a (previously non-existent) temporary directory to dump some files in. I'm guessing others have too (^^;
By "cross-platform", I'm mostly meaning various BSDs, Linux, macos, and recent Windows.
Did a bit of searching and have come up with the following links:
- Temporary folders Wikipedia page
- bsds (hier(7)) and linux
/tmpand/var/tmp - macos
$TMPDIR - windows
$TMP,$TEMP,$USERPROFILE,GetTempPath2
Following is a sketch of a possible flow:
- find "system" / "user" temporary directory
- verify it exists (it could disappear while doing the following step, but we'll ignore that for now)
- keep trying to make a new subdirectory of located + verified directory from steps 1 and 2 until success or some number of failures
The focus here is not on hiding things away (like is done in parts of Python's tempfile library), but just to have some place that won't accidentally get used.
Does this sound like:
- it might work
- something worth having in spork?
- code that exists already?
pepe
Metadata
Metadata
Assignees
Labels
No labels