get
No overview available.
def get(
from_path: str,
to_path: Optional[str | pathlib.Path] = None,
recursive: bool = False,
kwargs: Any
) - > str
Fetches a file or directory from a specified path and saves it to a local destination. This function handles various file systems and can perform recursive fetches for directories, attempting an anonymous fetch if the initial attempt fails.
Parameters
| Name | Type | Description |
|---|---|---|
| from_path | str | The source path of the file or directory to fetch. This can be a path on a remote file system (e.g., S3, Azure Blob Storage) or a local path. |
| to_path | `Optional[str | pathlib.Path]` = None |
| recursive | bool = False | A boolean indicating whether to fetch contents recursively if from_path is a directory. If True, all files and subdirectories within from_path will be fetched. |
| kwargs | Any | Additional keyword arguments to pass to the underlying file system operations, such as credentials or specific configuration options. |
Returns
| Type | Description |
|---|---|
str | The path to the locally saved file or directory. |