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

Removes a file from the filesystem.

Errors

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.

Example

extern crate fs_extra;
use fs_extra::file::remove;

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