https://github.com/samgiles/rs-mktemp
mktemp for Rust
https://github.com/samgiles/rs-mktemp
mktemp rust
Last synced: 6 months ago
JSON representation
mktemp for Rust
- Host: GitHub
- URL: https://github.com/samgiles/rs-mktemp
- Owner: samgiles
- License: mpl-2.0
- Created: 2016-03-25T18:20:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T22:05:32.000Z (almost 2 years ago)
- Last Synced: 2025-08-24T17:37:47.477Z (9 months ago)
- Topics: mktemp, rust
- Language: Rust
- Homepage: https://docs.rs/mktemp/
- Size: 46.9 KB
- Stars: 12
- Watchers: 2
- Forks: 15
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mktemp
[](https://docs.rs/mktemp)
[](https://crates.io/crates/mktemp)
[](./LICENSE)
[](https://github.com/samgiles/rs-mktemp/actions?query=workflow%3A%22Stable+Linux%22)
This module provides a simple way of creating temporary files and
directories where their lifetime is defined by the scope they exist in.
Once the variable goes out of scope, the underlying file system resource is removed.
See documentation for full API, and other use cases.
# Example
```RUST
use mktemp::Temp;
{
let temp_file = Temp::new_file().unwrap();
let file = fs::File::open(temp_file).unwrap();
} // temp_file is cleaned from the fs here
```
# Contributors
Special thanks to our contributors! [Contributors](https://github.com/samgiles/rs-mktemp/graphs/contributors)
# License
MPL v2