Function tauri_sys::fs::remove_file

source ·
pub async fn remove_file(file: &Path, dir: BaseDirectory) -> Result<(), Error>
Expand description

Removes a file.

§Example

use tauri_sys::fs;

fs::remove_file(path, BaseDirectory::Download).expect("could not remove file");

Requires allowlist > fs > removeFile to be enabled.