simplify metadata processes

This commit is contained in:
SpikeHD
2022-07-16 23:34:55 -07:00
parent 61ac332cee
commit 043f3e7ce4
3 changed files with 38 additions and 33 deletions

View File

@@ -21,6 +21,11 @@ pub fn rename(path: String, new_name: String) {
fs::rename(path, &path_replaced).unwrap();
}
#[tauri::command]
pub fn dir_create(path: String) {
fs::create_dir_all(path).unwrap();
}
#[tauri::command]
pub fn dir_exists(path: &str) -> bool {
let path_buf = std::path::PathBuf::from(path);

View File

@@ -42,6 +42,7 @@ fn main() {
proxy::generate_ca_files,
unzip::unzip,
file_helpers::rename,
file_helpers::dir_create,
file_helpers::dir_exists,
file_helpers::dir_is_empty,
file_helpers::dir_delete,