Skip to main content

select_template_source

Function select_template_source 

Source
pub fn select_template_source(
    config_path: impl AsRef<Path>,
    output_path: impl AsRef<Path>,
) -> PathBuf
Expand description

Chooses the source file used when generating templates.

Existing config files are preferred. If the config file does not exist, an existing output template is used as the source. If neither exists, the output path is returned so generation can start from an empty template tree.

§Arguments

  • config_path: Preferred config source path.
  • output_path: Output template path used as the fallback source.

§Returns

Returns the path that should be used as the root template source.