get
Asynchronously retrieves a file or directory from a specified source path and saves it to a local destination. Automatically resolves destination paths or generates a random local path if omitted, falling back to anonymous filesystem access if initial retrieval fails.
async def get(from_path: str, to_path: Optional[str | pathlib.Path] = None, recursive: bool = False, **kwargs) -> str: ...
Downloads or copies files or directories from a source path to a local destination, automatically determining the destination path and attempting anonymous access if initial retrieval fails.
Parameters
| Name | Type | Description |
|---|---|---|
| from_path | str | The source URI or file path from which data is retrieved. |
| to_path | `Optional[str | pathlib.Path]` = None |
| recursive | bool = False | Whether to recursively download all files and subdirectories if the source path is a directory. |
| kwargs | Any | Additional keyword arguments forwarded to the underlying filesystem get implementation. |
Returns
| Type | Description |
|---|---|
str | The local destination file or directory path where the data was saved. |