Crate temporary [−] [src]
Temporary files and directories.
Example
use std::fs::File; use std::io::Write; use temporary::Directory; // Create a temporary directory. let root = Directory::new("foo").unwrap(); // Do some work. let mut file = File::create(root.join("foo.txt")).unwrap(); file.write_all(b"Hello, there!").unwrap(); // The directory and its content get removed automatically.
Structs
Directory |
A temporary directory. |