MCPcopy Create free account
hub / github.com/GCWing/BitFun / save

Method save

src/apps/cli/src/config.rs:163–174  ·  view source on GitHub ↗

Save configuration

(&self)

Source from the content-addressed store, hash-verified

161
162 /// Save configuration
163 pub fn save(&self) -> Result<()> {
164 let config_path = Self::config_path()?;
165
166 if let Some(parent) = config_path.parent() {
167 fs::create_dir_all(parent)?;
168 }
169
170 let content = toml::to_string_pretty(self)?;
171 fs::write(&config_path, content)?;
172 tracing::info!("Saved config: {:?}", config_path);
173 Ok(())
174 }
175
176 /// Get configuration directory
177 pub fn config_dir() -> Result<PathBuf> {

Callers 4

loadMethod · 0.45
handle_config_actionFunction · 0.45
apply_theme_selectionMethod · 0.45
apply_theme_selectionMethod · 0.45

Calls 1

create_dir_allFunction · 0.85

Tested by

no test coverage detected