# filesystem_utils

Python API: `hubai_sdk.utils.filesystem_utils`

## Functions

| Name | Description |
| --- | --- |
|
[`download_from_remote`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/filesystem_utils.md)
| Downloads file(s) from remote bucket storage. |
|
[`get_protocol`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/filesystem_utils.md)
| Returns LuxonisFileSystem protocol. |
|
[`resolve_path`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/filesystem_utils.md)
| Downloads the file from remote or returns the path otherwise. |
|
[`upload_to_remote`](https://docs.luxonis.com/cloud/hubai/model-registry/hubai-sdk/hubai-sdk-api-reference/utils/filesystem_utils.md)
| Uploads a file to remote bucket storage. |

### function `download_from_remote`

```python
def download_from_remote(url: str, dest: Path | str, max_files: int = -1) -> Path
```

Downloads file(s) from remote bucket storage.

It can download a single file, an entire directory, or a limited number of files from a directory.

### function `get_protocol`

```python
def get_protocol(url: str) -> str
```

Returns LuxonisFileSystem protocol.

### function `resolve_path`

```python
def resolve_path(string: str, dest: Path) -> Path
```

Downloads the file from remote or returns the path otherwise.

### function `upload_to_remote`

```python
def upload_to_remote(
    local_path: Path | str,
    url: str,
    put_file_plugin: str | None = None,
)
```

Uploads a file to remote bucket storage.
