Skip to main content

get_raw_definition_paths

Function get_raw_definition_paths 

Source
pub fn get_raw_definition_paths(
    current_path: &Path,
    version: i16,
) -> Result<Vec<PathBuf>>
Expand description

Returns paths to all table definition files in an Assembly Kit directory.

This function scans the provided directory and returns paths to XML files containing table structure definitions, filtering by Assembly Kit version.

§Arguments

  • current_path - Directory containing Assembly Kit definition files
  • version - Assembly Kit version (0, 1, or 2)

§Returns

Returns a sorted vector of paths to definition files, or an error if the directory cannot be read.

§File Selection

  • Version 0 (Empire/Napoleon): .xsd files
  • Version 1/2 (Shogun 2+): Files starting with TWaD_ (excluding ignored metadata files)