fix dialog clicking

This commit is contained in:
SpikeHD
2022-06-05 21:11:53 -07:00
parent e9a7852456
commit c06cf874b5
4 changed files with 23 additions and 1 deletions

View File

@@ -22,4 +22,9 @@ pub fn rename(path: String, new_name: String) {
#[tauri::command]
pub fn dir_exists(path: &str) -> bool {
return fs::metadata(&path).is_ok();
}
#[tauri::command]
pub fn dir_is_empty(path: &str) -> bool {
return fs::read_dir(&path).unwrap().count() == 0;
}