9 unstable releases

Uses old Rust 2015

0.5.1 Sep 8, 2023
0.5.0 Nov 7, 2022
0.4.1 Jan 5, 2021
0.4.0 Mar 17, 2019
0.1.2 Mar 25, 2016

#305 in Filesystem

Download history 7145/week @ 2024-03-14 6863/week @ 2024-03-21 6835/week @ 2024-03-28 6357/week @ 2024-04-04 6422/week @ 2024-04-11 6978/week @ 2024-04-18 6273/week @ 2024-04-25 5532/week @ 2024-05-02 6200/week @ 2024-05-09 6807/week @ 2024-05-16 5682/week @ 2024-05-23 6490/week @ 2024-05-30 7556/week @ 2024-06-06 6671/week @ 2024-06-13 6984/week @ 2024-06-20 5507/week @ 2024-06-27

27,987 downloads per month
Used in 65 crates (53 directly)

MPL-2.0 license

11KB
223 lines

mktemp

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 = fs::File::open(temp_file).unwrap();
} // temp_file is cleaned from the fs here

Contributors

Special thanks to our contributors! Contributors

License

MPL v2

Dependencies

~245KB