pub fn remove_file<P: AsRef<Path>>(path: P) -> Result<()>
Removes a file from the filesystem.
Note that there is no guarantee that the file is immediately deleted (e.g. depending on platform, other open file descriptors may prevent immediate removal).
This function will return an error if
path points to a directory, if the
user lacks permissions to remove the file, or if some other filesystem-level
use std::fs; try!(fs::remove_file("a.txt"));