mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 00:24:45 +01:00
simplify metadata processes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user