Function tauri_sys::fs::remove_dir

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

Removes a directory. If the directory is not empty the promise will be rejected.

§Example

use tauri_sys::fs;

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

Requires allowlist > fs > removeDir to be enabled.