tauri_sys::fs

Function exists

source
pub async fn exists(path: &Path, dir: BaseDirectory) -> Result<bool, Error>
Expand description

Checks if a path exists.

ยงExample

use tauri_sys::fs;

let file_exists = fs::exists(path, BaseDirectory::Download).expect("could not check if path exists");

Requires allowlist > fs > exists to be enabled.