mktemp

Crates.iomktemp
lib.rsmktemp
version0.5.1
sourcesrc
created_at2016-03-25 18:26:23.054306
updated_at2023-09-08 15:59:53.677321
descriptionmktemp files and directories
homepagehttps://docs.rs/mktemp
repositoryhttps://github.com/samgiles/rs-mktemp
max_upload_size
id4563
size29,028
Sam Giles (samgiles)

documentation

https://docs.rs/mktemp

README

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

Commit count: 54

cargo fmt