tauri_sys::fs

Function remove_dir_all

Source
pub async fn remove_dir_all(
    dir: &Path,
    base_dir: BaseDirectory,
) -> Result<(), Error>
Expand description

Removes a directory and its contents.

ยงExample

use tauri_sys::fs;

fs::remove_dir_all(path, BaseDirectory::Download).expect("could not remove directory");

Requires allowlist > fs > removeDir to be enabled.