use std::path::PathBuf;
use crate::home::UnifierHome;
const DAEMON_DIR: &str = ".daemon";
pub fn daemon_dir(home: &UnifierHome) -> PathBuf {
home.path().join(DAEMON_DIR)
}
pub fn socket_path(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("unifier.sock")
}
pub fn events_socket_path(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("events.sock")
}
pub fn tick_socket_path(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("tick.sock")
}
pub fn pid_path(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("unifier.pid")
}
pub fn www_dir(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("www")
}
pub fn http_port_path(home: &UnifierHome) -> PathBuf {
daemon_dir(home).join("http.port")
}