Skip to main content

get_raw_data_paths

Function get_raw_data_paths 

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

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

This function scans for XML files containing sample table data (as opposed to definitions).

§Arguments

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

§Returns

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

§File Selection

  • Version 0 (Empire/Napoleon): XML files without .xsd extension
  • Version 1/2 (Shogun 2+): XML files that don’t start with TWaD_