summaryrefslogtreecommitdiff
path: root/src/paths.rs
blob: 7bbc8f8f288b5fad68ef454fcadb597f1032c8ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::path::PathBuf;

use crate::Result;

pub fn zap_rs_home() -> Result<PathBuf> {
    let home = std::env::var("HOME")?;
    Ok(PathBuf::from(home).join(".local/share/zap-rs"))
}

pub fn index_dir() -> Result<PathBuf> {
    Ok(zap_rs_home()?.join("index"))
}

pub fn appimages_dir() -> Result<PathBuf> {
    Ok(zap_rs_home()?.join("appimages"))
}