|
The crate implements a safe wrapper around mkdtemp(3) and mkstemp(3)
which provide decent temporary file and directory creation. The key
feature we provide is that we wrap the resulting path in a TempFile /
TempDir struct. This allows us to implement the Drop trait such that the
temporary directory / file is automatically deleted when the value goes
out of scope in Rust which saves the programmer from cleaning up
temporary artifacts themselves.
The API is indeed very tiny currently, only implementing creation and
AsRef<Path> which should allow all necessary path / file manipulation.
|