---
sidebar_position: 20
description: How to configure a file retriever.
---
import { integrations } from "@site/data/integrations";
import {Mandatory, NotMandatory} from "@site/src/components/checks/checks";
export const retrieverName = 'File System'
export const info = integrations.retrievers.find((r) => r.name === retrieverName)

# File

## Overview
{info.longDescription ?? info.description}

## Configure the relay proxy

To configure your relay proxy to use the {retrieverName} retriever, you need to add the following
configuration to your relay proxy configuration file:

```yaml title="goff-proxy.yaml"
# ...
retrievers:
  - kind: file
    path: /goff/my-flags.yaml
# ...
```

| Field name |   Mandatory   | Type   | Default  | Description                                                                                            |
|------------|:-------------:|--------|----------|--------------------------------------------------------------------------------------------------------|
| `kind`     | <Mandatory /> | string | **none** | **Value should be `file`**.<br/>_This field is mandatory and describes which retriever you are using._ |
| `path`     | <Mandatory /> | string | **none** | Path to the file in your local computer _(ex: `/goff/my-flags.yaml`)_.                                 |

## Configure the GO Module
To configure your GO module to use the {retrieverName} retriever, you need to add the following
configuration to your `ffclient.Config{}` object:

```go title="example.go"
import 	"github.com/thomaspoignant/go-feature-flag/retriever/file"
// ...
err := ffclient.Init(ffclient.Config{
    PollingInterval: 3 * time.Second,
    Retriever: &fileretriever.Retriever{
        Path: "/goff/my-flags.yaml",
    },
})
defer ffclient.Close()
```

| Field      |   Mandatory   | Description                               |
|------------|:-------------:|-------------------------------------------|
| **`Path`** | <Mandatory /> | location of your file on the file system. |