Function cc2p::delete_if_exist

source ·
pub fn delete_if_exist(filename: &str) -> Result<(), Box<dyn Error>>
Expand description

Deletes a file if it exists.

§Arguments

  • filename - The name of the file to delete.

§Errors

Returns Err if there is an error accessing the file or deleting it.