Crates.io | mktemp |
lib.rs | mktemp |
version | 0.5.1 |
source | src |
created_at | 2016-03-25 18:26:23.054306 |
updated_at | 2023-09-08 15:59:53.677321 |
description | mktemp files and directories |
homepage | https://docs.rs/mktemp |
repository | https://github.com/samgiles/rs-mktemp |
max_upload_size | |
id | 4563 |
size | 29,028 |
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.
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
Special thanks to our contributors! Contributors
MPL v2