validate_dataset_structure

Function validate_dataset_structure 

Source
pub fn validate_dataset_structure(
    dataset_dir: &Path,
) -> Result<Vec<ValidationIssue>, Error>
Expand description

Validate the structure of a dataset directory.

Checks that the directory follows the EdgeFirst Dataset Format:

  • Arrow file exists at expected location
  • Sensor container directory exists
  • All files referenced in Arrow file exist in container
  • Reports any unreferenced files

§Arguments

  • dataset_dir - Path to the snapshot root directory

§Returns

A list of validation issues (empty if valid).

§Example

use edgefirst_client::format::validate_dataset_structure;
use std::path::Path;

let issues = validate_dataset_structure(Path::new("my_dataset"))?;
if issues.is_empty() {
    println!("Dataset structure is valid!");
} else {
    for issue in &issues {
        eprintln!("Issue: {}", issue);
    }
}