diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-21 16:37:51 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-21 16:37:51 +0800 |
| commit | c811c5818d21a67280ef9dd35ad40f6f5411daa5 (patch) | |
| tree | 46062311242da24771466ad99be26b530e83d497 /legacy_data/src/data/user.rs | |
| parent | 9a60751a901f568bdeb154c4115235d4f3a0f8b9 (diff) | |
Good Bye! Legacy JVCS
Diffstat (limited to 'legacy_data/src/data/user.rs')
| -rw-r--r-- | legacy_data/src/data/user.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/legacy_data/src/data/user.rs b/legacy_data/src/data/user.rs deleted file mode 100644 index a2326fa..0000000 --- a/legacy_data/src/data/user.rs +++ /dev/null @@ -1,28 +0,0 @@ -use crate::env::current_cfg_dir; -use std::path::PathBuf; - -pub mod accounts; - -pub struct UserDirectory { - local_path: PathBuf, -} - -impl UserDirectory { - /// Create a user ditectory struct from the current system's document directory - pub fn current_cfg_dir() -> Option<Self> { - Some(UserDirectory { - local_path: current_cfg_dir()?, - }) - } - - /// Create a user directory struct from a specified directory path - /// Returns None if the directory does not exist - pub fn from_path<P: Into<PathBuf>>(path: P) -> Option<Self> { - let local_path = path.into(); - if local_path.exists() { - Some(UserDirectory { local_path }) - } else { - None - } - } -} |
