MCPcopy Create free account
hub / github.com/Recordscript/recordscript / config_path

Function config_path

src-tauri/src/configuration.rs:5–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3use serde::{de::DeserializeOwned, Deserialize, Serialize};
4
5fn config_path<D>() -> PathBuf {
6 let config_path = super::project_directory().config_dir().to_path_buf();
7
8 std::fs::create_dir_all(&config_path).expect("Can't create config directory");
9
10 config_path.join(format!("{}.bin", std::any::type_name::<D>()).replace("::", "-"))
11}
12
13fn document_path() -> PathBuf {
14 let user_dirs = directories::UserDirs::new().expect("Can't find user directory");

Callers

nothing calls this directly

Calls 2

project_directoryFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected