aboutsummaryrefslogtreecommitdiff
path: root/libs/nak/src/paths.rs
blob: f6dde6c6aaaf4222396561f23797b112341439b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
//! Shared data directory for Fluorine Manager.
//!
//! All data lives under `~/.local/share/fluorine/`.

use std::path::PathBuf;

/// Returns the Fluorine data directory (`~/.local/share/fluorine`).
pub fn data_dir() -> PathBuf {
    let home = std::env::var("HOME").unwrap_or_else(|_| "/tmp".to_string());
    PathBuf::from(home).join(".local/share/fluorine")
}