7 unstable releases

Uses old Rust 2015

0.4.1 Jan 5, 2021
0.4.0 Mar 17, 2019
0.3.1 Jul 18, 2016
0.2.1 Jun 26, 2016
0.1.2 Mar 25, 2016

#72 in Filesystem

Download history 9517/week @ 2021-10-03 9691/week @ 2021-10-10 11092/week @ 2021-10-17 11785/week @ 2021-10-24 8436/week @ 2021-10-31 10029/week @ 2021-11-07 8723/week @ 2021-11-14 6318/week @ 2021-11-21 7533/week @ 2021-11-28 9638/week @ 2021-12-05 9717/week @ 2021-12-12 7463/week @ 2021-12-19 5546/week @ 2021-12-26 8527/week @ 2022-01-02 11388/week @ 2022-01-09 11636/week @ 2022-01-16

37,154 downloads per month
Used in 48 crates (40 directly)

MPL-2.0 license

11KB
234 lines

mktemp

crates.io Released API docs Crates.io MPL licensed CI

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

use mktemp::Temp;

{
  let temp_file = Temp::new_file().unwrap();
  let file = try!(fs::File::open(temp_file));
}
// temp_file is cleaned from the fs here

Contributors

Special thanks to our contributors! Contributors

License

MPL v2

Dependencies

~235KB

B8_