diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-02-13 23:30:40 +0100 |
---|---|---|
committer | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-02-13 23:42:55 +0100 |
commit | 587fcc7b89cda8abbbd1f08722b2b3e1349869c8 (patch) | |
tree | 454e8dd7d9ce0f37d311aa9b8ccc08c54dce6f2c /pkgs/devhell | |
parent | 059bee06233d1987746f625905d552e219d4bfbc (diff) |
pkgs/sternenseemann/temp: add tiny temporary file/dir crate
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.
Diffstat (limited to 'pkgs/devhell')
0 files changed, 0 insertions, 0 deletions