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

#609 in Filesystem

Download history 7837/week @ 2023-12-15 4712/week @ 2023-12-22 6050/week @ 2023-12-29 7917/week @ 2024-01-05 7398/week @ 2024-01-12 9011/week @ 2024-01-19 7186/week @ 2024-01-26 6206/week @ 2024-02-02 7322/week @ 2024-02-09 6458/week @ 2024-02-16 6631/week @ 2024-02-23 7137/week @ 2024-03-01 6209/week @ 2024-03-08 7298/week @ 2024-03-15 6970/week @ 2024-03-22 5654/week @ 2024-03-29

27,702 downloads per month
Used in 66 crates (54 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

~225KB