Skip to main content

init_config

Function init_config 

Source
pub fn init_config(target_path: Option<&Path>) -> Result<PathBuf, ConfigError>
Expand description

Create a default config file at the given path (or the default XDG path).

ยงErrors

  • ConfigError::AlreadyExists if the file already exists
  • ConfigError::Io on I/O failure
  • ConfigError::NoConfigDir if no target path and platform config dir unknown