get_random_local_path
Use file_path_or_file_name, when you want a random directory, but want to preserve the leaf file name
def get_random_local_path(
file_path_or_file_name: pathlib.Path | str | None = None
) - > pathlib.Path
Use file_path_or_file_name, when you want a random directory, but want to preserve the leaf file name
Parameters
| Name | Type | Description |
|---|---|---|
| file_path_or_file_name | `pathlib.Path | str |
Returns
| Type | Description |
|---|---|
pathlib.Path | A pathlib.Path object representing a random local path, potentially including a preserved leaf file name. |