# File

{% hint style="info" %}
The following documentation is for **File v1.8.0**.
{% endhint %}

## Overview

Enables reading, writing, and manipulating files.

## Setup

The following integrations need to be connected to your Kognitos workspace:

* **File**

### Steps

Follow these steps to connect the integration in Kognitos:

{% stepper %}
{% step %}
**Navigate**

Using the left navigation menu, go to **Integrations** → **Explore Integrations**.
{% endstep %}

{% step %}
**Find**

Search for the integration and click on it.
{% endstep %}

{% step %}
**Connect**

Click on <kbd>**Connect**</kbd> to add a connection to the integration.
{% endstep %}

{% step %}
**Configure**

Add a name for the connection. You'll be prompted for [**authentication**](#authentication) details if needed. Then, click on <kbd>**Connect**</kbd>.
{% endstep %}
{% endstepper %}

## Actions

The following actions are available in the **File** integration:

### 1. Get the file's extension

Get the extension of a file.

### 2. Get the file's mime type

Get the MIME type of a file.

### 3. Get the file's name

Get the name of a file.

### 4. Get the file's size

Get the size of a file in a human-readable format.

### 5. Read the file

Read the contents of a file as a string.

### 6. Read the file as a base64 string

Read the contents of a file as a base64-encoded string.

### 7. Rename a file

Rename a file by changing its filename and/or extension.

### 8. Write a file

Create a file with the specified content.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/guides/platform/integrations/file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
