Expand description
Utility functions for creating temporary files and directories.
Most of these types wrap around the tempfile
crate. We add two
additional features:
- There are wrappers around temporary directories and files that expose the dir/file as an object store path, std path, or string, which can save some boilerplate.
- We work around a current bug in the
url
crate which fails to parse Windows paths likeC:\
correctly. We do so by replacing all\
with/
in the path. This is not safe in general (e.g. paths may use\
as an escape) but it should be safe for temporary paths.
Structsยง
- TempDir
- A temporary directory
- Temp
File - A temporary file
- Temp
ObjDir - A temporary directory that is exposed as an object store path
- Temp
ObjFile - A temporary file that is exposed as an object store path
- Temp
StdDir - A temporary directory that is exposed as a standard library path
- Temp
StdFile - A temporary file that is exposed as a standard library path
- Temp
StdPath - Get a unique path to a temporary file
- Temp
StrDir - A temporary directory that is exposed as a string