Function fs_extra::file::remove [] [src]

pub fn remove<P>(path: P) -> Result<()> where
    P: AsRef<Path>, 

Removes a file from the filesystem.


This function will return an error in the following situations, but is not limited to just these cases:

  • The current process does not have the permission rights to access path.


Be careful when using this code, it's not being tested!
extern crate fs_extra;
use fs_extra::file::remove;

remove("foo.txt" )?; // Remove foo.txt