file_and_directory_handler
process_path(path)
¶
Converts the input to a pathlib.Path object if it is a string, and returns the pathlib.Path object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path | None
|
The file path, which can be a string or a pathlib.Path object. |
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the input is neither a string nor a pathlib.Path object. |