find_config_file

Function find_config_file 

Source
pub fn find_config_file(relative_path: &str) -> Option<PathBuf>
Expand description

What: Find a config file in development and installed locations.

Inputs:

  • relative_path: Relative path from config directory (e.g., “i18n.yml”)

Output:

  • Some(PathBuf) pointing to the first existing file found, or None if not found

Details:

  • Tries locations in order:
    1. Development location: CARGO_MANIFEST_DIR/config/{relative_path} (prioritized when running from source)
    2. Installed location: /usr/share/pacsea/config/{relative_path}
  • Development location is checked first to allow working with repo files during development