Function cargo_util::paths::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.