# fileContents

```graphql
query FileContents($input: FileContentsInput!) {
  fileContents(input: $input) {
    data {
      path
      found
    }
  }
}
```

Return the files at the given paths. Requires project.files.read.

## Arguments

| Name                     | Type               | Required | Description                                                                                 |
| ------------------------ | ------------------ | -------- | ------------------------------------------------------------------------------------------- |
| `input`                  | FileContentsInput! | Yes      |                                                                                             |
| `input.projectReference` | String             |          | Project UUID, slug or configured domain. Omit it to use the project of the request.         |
| `input.ref`              | String             |          | Content to read: main, branch:<name-or-id>, release:<version> or env:<name>. Omit for main. |
| `input.paths`            | \[String!]!        | Yes      | Exact file paths to read. Results keep this order.                                          |

## Variables

```json
{
  "input": {
    "paths": [
      "string"
    ]
  }
}
```

## Responses

| Status | Description                          |
| ------ | ------------------------------------ |
| 200    | The FileBatch! in data.fileContents. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query FileContents($input: FileContentsInput!) {\n  fileContents(input: $input) {\n    data {\n      path\n      found\n    }\n  }\n}",
  "variables": {
    "input": {
      "paths": [
        "string"
      ]
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "fileContents": {
      "data": [
        {
          "path": "string",
          "found": false
        }
      ]
    }
  }
}
```
