dgs.utils.validation.validate_filepath¶
- dgs.utils.validation.validate_filepath(file_paths: str | Iterable[str] | tuple[str, ...], length: int | None = None) tuple[str, ...] [source]¶
Validate the file path.
- Parameters:
file_paths – Path to the file as a string or a file object.
length – The length a
FilePaths
object should have. Except for a length of 1 not applicable forFilePath
.
- Returns:
The validated file path.
- Return type:
FilePaths
- Raises:
InvalidPathException – If at least one of the paths in file_paths does not exist.