# GCSDirectoryLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/gcs_directory/GCSDirectoryLoader)

Load from GCS directory.

## Signature

```python
GCSDirectoryLoader(
    self,
    project_name: str,
    bucket: str,
    prefix: str = '',
    loader_func: Optional[Callable[[str], BaseLoader]] = None,
    continue_on_failure: bool = False,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_name` | `str` | Yes | The ID of the project for the GCS bucket. |
| `bucket` | `str` | Yes | The name of the GCS bucket. |
| `prefix` | `str` | No | The prefix of the GCS bucket. (default: `''`) |
| `loader_func` | `Optional[Callable[[str], BaseLoader]]` | No | A loader function that instantiates a loader based on a file_path argument. If nothing is provided, the  GCSFileLoader would use its default loader. (default: `None`) |
| `continue_on_failure` | `bool` | No | To use try-except block for each file within the GCS directory. If set to `True`, then failure to process a file will not cause an error. (default: `False`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    project_name: str,
    bucket: str,
    prefix: str = '',
    loader_func: Optional[Callable[[str], BaseLoader]] = None,
    continue_on_failure: bool = False,
)
```

| Name | Type |
|------|------|
| `project_name` | `str` |
| `bucket` | `str` |
| `prefix` | `str` |
| `loader_func` | `Optional[Callable[[str], BaseLoader]]` |
| `continue_on_failure` | `bool` |


## Properties

- `project_name`
- `bucket`
- `prefix`
- `continue_on_failure`

## Methods

- [`load()`](https://reference.langchain.com/python/langchain-community/document_loaders/gcs_directory/GCSDirectoryLoader/load)

## ⚠️ Deprecated

Deprecated since version 0.0.32.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/document_loaders/gcs_directory.py#L14)