1use std::path::PathBuf;
4
5use crate::home::UnifierHome;
6
7const DAEMON_DIR: &str = ".daemon";
8
9pub fn daemon_dir(home: &UnifierHome) -> PathBuf {
10 home.path().join(DAEMON_DIR)
11}
12
13pub fn socket_path(home: &UnifierHome) -> PathBuf {
14 daemon_dir(home).join("unifier.sock")
15}
16
17pub fn events_socket_path(home: &UnifierHome) -> PathBuf {
19 daemon_dir(home).join("events.sock")
20}
21
22pub fn tick_socket_path(home: &UnifierHome) -> PathBuf {
27 daemon_dir(home).join("tick.sock")
28}
29
30pub fn pid_path(home: &UnifierHome) -> PathBuf {
31 daemon_dir(home).join("unifier.pid")
32}
33
34pub fn www_dir(home: &UnifierHome) -> PathBuf {
36 daemon_dir(home).join("www")
37}
38
39pub fn http_port_path(home: &UnifierHome) -> PathBuf {
41 daemon_dir(home).join("http.port")
42}