---
title: "Read file"
method: GET
path: "/file/content"
---

# Read file

`GET /file/content`

Read the content of a specified file.

## Query parameters

- `directory` string
- `path` string, required

## Response `200`

File content

- FileContent
  - `type` 'text', required
  - `content` string, required
  - `diff` string
  - `patch` object
    - `oldFileName` string, required
    - `newFileName` string, required
    - `oldHeader` string
    - `newHeader` string
    - `hunks` object[], required
      - `oldStart` number, required
      - `oldLines` number, required
      - `newStart` number, required
      - `newLines` number, required
      - `lines` string[], required
    - `index` string
  - `encoding` 'base64'
  - `mimeType` string

## Changes

- **2026-02-14** `9df3a7d5f839` — 3 info
  - the `type` response property const value `text` was added for the status `200`
  - removed the `binary` enum value from the `type` response property for the response status `200`
  - removed the `text` enum value from the `type` response property for the response status `200`
- **2026-02-01** `3fb98124f05d` — 1 breaking, 2 warning
  - the `type` response property const value `text` was removed for the status `200`
  - added the new `binary` enum value to the `type` response property for the response status `200`
  - added the new `text` enum value to the `type` response property for the response status `200`

[Change history](https://skmtc.dev/martian-engineering/apis/voltcode/changes/file/content/get.md)

---

[API](https://skmtc.dev/martian-engineering/apis/voltcode.md) · [All operations](https://skmtc.dev/martian-engineering/apis/voltcode/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/martian-engineering/voltcode/revisions/d28625e4a7ea/schema)
