samueltardieu / rs-mktemp

mktemp for Rust

Home Page:https://docs.rs/mktemp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

mktemp for Rust

https://docs.rs/mktemp/

License:Mozilla Public License 2.0


Languages

Language:Rust 100.0%