Skip to main content

default_config_path

Function default_config_path 

Source
pub fn default_config_path() -> Result<PathBuf>
Expand description

Resolve the default config path.

Resolution order:

  1. $XDG_CONFIG_HOME/audiorouter/config.toml — if XDG_CONFIG_HOME is set and non-empty
  2. ~/.config/audiorouter/config.toml — if the file already exists there (XDG fallback, honoured on all platforms so dotfile-managed configs work on macOS/Windows too)
  3. Platform-native config directory:
    • Linux/BSD: ~/.config/audiorouter/config.toml
    • macOS: ~/Library/Application Support/audiorouter/config.toml
    • Windows: %APPDATA%\audiorouter\config.toml

§Errors

Returns an error if the home/config directory cannot be determined.