remove_file in cargo_util::paths - Rust
Description: Equivalent to `std::fs::remove_file` with better error messages.

Skip to main content

## remove_file

# Function remove_file

Source

    pub fn remove_file<P: AsRef<Path>>(p: P) -> Result<()>

Expand description

Equivalent to `std::fs::remove_file` with better error messages.

If the file is readonly, this will attempt to change the permissions to force the file to be deleted. On Windows, if the file is a symlink to a directory, this will attempt to remove the symlink itself.