![]() |
PyHelios 0.1.11
|
Functions | |
| str | validate_file_path (str filename, List[str] expected_extensions=None, bool must_exist=True, str param_name="filename", str function_name=None) |
| Validate and normalize file path with security checks. | |
| str | validate_directory_path (str directory, bool must_exist=True, bool create_if_missing=False, str param_name="directory", str function_name=None) |
| Validate and normalize directory path. | |
| str pyhelios.validation.files.validate_directory_path | ( | str | directory, |
| bool | must_exist = True, | ||
| bool | create_if_missing = False, | ||
| str | param_name = "directory", | ||
| str | function_name = None ) |
Validate and normalize directory path.
| directory | Directory path to validate |
| must_exist | Whether directory must already exist |
| create_if_missing | Create directory if it doesn't exist |
| param_name | Parameter name for error messages |
| function_name | Function name for error messages |
| ValidationError | If path is invalid or doesn't exist |
| str pyhelios.validation.files.validate_file_path | ( | str | filename, |
| List[str] | expected_extensions = None, | ||
| bool | must_exist = True, | ||
| str | param_name = "filename", | ||
| str | function_name = None ) |
Validate and normalize file path with security checks.
Based on Context._validate_file_path but enhanced with ValidationError and standardized error messaging.
| filename | File path to validate |
| expected_extensions | List of allowed file extensions (e.g., ['.ply', '.obj']) |
| must_exist | Whether file must already exist |
| param_name | Parameter name for error messages |
| function_name | Function name for error messages |
| ValidationError | If path is invalid, doesn't exist, or has wrong extension |