drop-dir
A very simple crate for creating RAII directories.
Example
use PathBuf;
use DropDir;
use File;
let drop_dir = new.unwrap;
let mut file = create.unwrap;
// drop_dir deleted when it goes out of scope.
Limitation
In the example above, only the last component of the drop_dir
is removed.
That is, the dir /tmp/some/temp/path
is deleted, but /tmp/some/temp
remains.
Any other behavior would get complicated.