pub fn validate_file_exists(path: &Path, arg_name: &str) -> Result<()>Expand description
Validate that a file or directory exists at the given path.
§Arguments
path- The path to checkarg_name- The argument name (used in error messages)
§Returns
Ok(())if the path existsErr(ValidationError::FileNotFound)if the path does not exist
§Example
use dynamic_cli::validator::validate_file_exists;
use std::path::Path;
validate_file_exists(Path::new("config.yaml"), "config")?;