pub fn validate_file_references(
references: &[String],
project_dir: &Path,
) -> Result<Vec<String>>Expand description
Validate that file references exist on the filesystem.
This function takes a list of relative file paths and checks if they exist relative to the given project directory. It returns a list of missing references for error reporting.
§Arguments
references- List of relative file paths to validateproject_dir- Base directory to resolve relative paths against
§Returns
A list of references that were not found
§Errors
Returns an error if the project directory cannot be accessed
§Examples
let references = vec![
".agpm/snippets/existing.md".to_string(),
".agpm/snippets/missing.md".to_string(),
];
let project_dir = Path::new("/path/to/project");
let missing = validate_file_references(&references, project_dir)?;
// Returns only the missing.md entry