diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-09-24 18:11:45 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-09-24 18:11:45 +0800 |
| commit | 1a4de0d2da25ed3ab9b80d1cc83a4edfadd8f8ba (patch) | |
| tree | 7f25211c1800c43f21752497310b1b16301995fb /crates/env | |
| parent | f7b61b89581a8d7d822067f9f36020e1049c491d (diff) | |
Add function `current_doc_dir`
Diffstat (limited to 'crates/env')
| -rw-r--r-- | crates/env/src/current.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/env/src/current.rs b/crates/env/src/current.rs index efa4117..97b5058 100644 --- a/crates/env/src/current.rs +++ b/crates/env/src/current.rs @@ -71,3 +71,8 @@ pub fn find_local_path(path: impl Into<PathBuf>) -> Option<PathBuf> { None } + +/// Get the system's document directory and join with .just_enough_vcs +pub fn current_doc_dir() -> Option<PathBuf> { + dirs::document_dir().map(|path| path.join(".just_enough_vcs")) +} |
