mktemp

mktemp files and directories

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
Download history 7363/week @ 2024-06-07 6902/week @ 2024-06-14 7050/week @ 2024-06-21 5760/week @ 2024-06-28 5489/week @ 2024-07-05 6869/week @ 2024-07-12 6379/week @ 2024-07-19 7071/week @ 2024-07-26 6168/week @ 2024-08-02 5721/week @ 2024-08-09 5007/week @ 2024-08-16 5937/week @ 2024-08-23 5619/week @ 2024-08-30 6674/week @ 2024-09-06 4997/week @ 2024-09-13 6682/week @ 2024-09-20

25,065 downloads per month
Used in 64 crates (52 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