diff options
| author | Naz <ndpm13@ch-naseem.com> | 2025-07-25 15:30:04 +0100 |
|---|---|---|
| committer | Naz <ndpm13@ch-naseem.com> | 2025-07-25 15:30:04 +0100 |
| commit | aaf24a57b42d10c69cfa2db0c297c93dc18741e4 (patch) | |
| tree | f29fa575bf3b925248a99f8198142f7bc0e5233c | |
| parent | 0b77041242271964ae66241fcb34ed63353bd295 (diff) | |
✨feat: add core directory utilities
| -rw-r--r-- | src/lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..90cee5e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,15 @@ +use std::path::PathBuf; + + +pub fn ndpm_ai_home() -> PathBuf { + let home = std::env::var("HOME").expect("HOME not set"); + PathBuf::from(home).join(".local/share/ndpm-appimage") +} + +pub fn index_dir() -> PathBuf { + ndpm_ai_home().join("index") +} + +pub fn appimages_dir() -> PathBuf { + ndpm_ai_home().join("appimages") +} |
