delete_file

Function delete_file 

Source
pub fn delete_file(directory: &str, file_name: &str) -> Result<()>
Expand description

Deletes a file with a specific name in a specific directory.

§Arguments

  • directory - The path to the directory where the file is located.
  • file_name - The name of the file to delete.

§Returns

  • Ok(()) if the file is deleted successfully.
  • Err(io::Error) if an error occurs.