telar_platform_desktop/
paths.rs1use std::path::PathBuf;
2
3use services_core::AppPathsProvider;
4
5pub struct DesktopPathsProvider;
6
7impl AppPathsProvider for DesktopPathsProvider {
8 fn config_dir(&self) -> Option<PathBuf> {
9 dirs::config_dir()
10 }
11
12 fn data_dir(&self) -> Option<PathBuf> {
13 dirs::data_dir()
14 }
15
16 fn cache_dir(&self) -> Option<PathBuf> {
17 dirs::cache_dir()
18 }
19
20 fn state_dir(&self) -> Option<PathBuf> {
21 dirs::state_dir().or_else(|| dirs::data_dir())
22 }
23
24 fn runtime_dir(&self) -> Option<PathBuf> {
25 dirs::runtime_dir()
26 }
27}