Skip to main content

discover_theme_file

Function discover_theme_file 

Source
pub fn discover_theme_file(
    project_dir: &Path,
) -> Option<Result<ThemeDocument, String>>
Expand description

Discover theme.dampen file in a project directory.

Looks for src/ui/theme/theme.dampen in the given project directory.

§Arguments

  • project_dir - The root directory of the Dampen project

§Returns

  • Some(Ok(ThemeDocument)) - If a valid theme file was found
  • Some(Err(_)) - If the file exists but couldn’t be parsed
  • None - If no theme file was found