refactor: adjust dirs structure

This commit is contained in:
GyDi committed 2021-12-14 16:07:15 +08:00
1 parent db802e959d
commit 4719649bf4
9 files changed
+35 -20

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
use std::path::{Path, PathBuf};
use tauri::{
api::path::{home_dir, resource_dir},
PackageInfo,
};
/// get the verge app home dir
pub fn app_home_dir() -> PathBuf {
home_dir()
.unwrap()
.join(Path::new(".config"))
.join(Path::new("clash-verge"))
}
/// get the resources dir
pub fn app_resources_dir(package_info: &PackageInfo) -> PathBuf {
resource_dir(package_info).unwrap().join("resources")
}