[][src]Crate mktemp

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.

Examples

use mktemp::Temp;
use std::fs;

{
  let temp_file = Temp::new_file().unwrap();
  assert!(fs::File::open(temp_file).is_ok());
}
// temp_file is cleaned from the fs here

Structs

Temp