summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-07-25 15:30:04 +0100
committerNaz <ndpm13@ch-naseem.com>2025-07-25 15:30:04 +0100
commitaaf24a57b42d10c69cfa2db0c297c93dc18741e4 (patch)
treef29fa575bf3b925248a99f8198142f7bc0e5233c /src/lib.rs
parent0b77041242271964ae66241fcb34ed63353bd295 (diff)
✨feat: add core directory utilities
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs15
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")
+}