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:
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?
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:
/tmpand/var/tmp$TMPDIR$TMP,$TEMP,$USERPROFILE,GetTempPath2Following is a sketch of a possible flow:
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: