Skip to content

Lack of cross-platform function to create temporary directoryΒ #189

@sogaiu

Description

@sogaiu

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:

  1. find "system" / "user" temporary directory
  2. verify it exists (it could disappear while doing the following step, but we'll ignore that for now)
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions