> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squarecloud.app/llms.txt
> Use this file to discover all available pages before exploring further.

# ファイルの読み取り

> アプリケーションからファイルを読み取ります。

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  アカウントの API キーです。これは[アカウント設定](https://squarecloud.app/ja/account/security)で確認できます。
</ParamField>

### Parameters

<ParamField path="app_id" type="string" placeholder="Application ID" required>
  アプリケーションのID。アプリケーションのダッシュボードのURLで確認できます。
</ParamField>

<ParamField query="path" type="string" placeholder="Example: src/index.js" required>
  読み取りたいファイルのパス。これはアプリケーションのルートからの相対パスです。
</ParamField>

### Response

<ResponseField name="status" type="string">
  呼び出しが成功したかどうかを示します。成功した場合は `success`、失敗した場合は `error` です。
</ResponseField>

<ResponseField name="response" type="object">
  ファイルの内容。

  <Expandable title="オブジェクトを切り替え">
    <ResponseField name="type" type="string">
      データの種類。バイナリデータの場合は "Buffer" です。
    </ResponseField>

    <ResponseField name="data" type="array">
      数値の配列として表現されたファイルのデータ。これらの数値はファイルのバイトを表します。
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
      "status": "success",
      "response": {
          "type": "Buffer",
          "data": [
              112,
              111,
              120,
              97,
              44,
              32,
              116,
              97,
              32,
              113,
              117,
              101,
              114,
              101,
              110,
              100,
              111,
              32,
              99,
              111,
              112,
              105,
              97,
              114,
              32,
              97,
              116,
              195,
              169,
              32,
              111,
              32,
              98,
              117,
              102,
              102,
              101,
              114,
              63
          ]
      }
  }
  ```
</ResponseExample>
