> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/double-braces/double-braces-functions/file-functions.md).

# File functions

Learn about file functions in the Digibee Integration Platform and how to use them.

The file functions make queries to metadata and make validations in files and are available for components that support Double Braces expressions. To know how to provide information to the components using this resource, refer to [Double Braces Functions](/documentation/connectors-and-triggers/double-braces/double-braces-functions.md).

## FILEEXISTS <a href="#fileexists" id="fileexists"></a>

Checks if a file exists in the virtual directory of the pipeline deployment.

### **Syntax**

```
FILEEXISTS(file)
```

* **file:** name of the file in the virtual directory of the pipeline

The function returns `true` when the file is found and `false` when it's not found.

## FILESIZE <a href="#filesize" id="filesize"></a>

Returns the size of a file in the virtual directory of the pipeline deployment.

### **Syntax**

```
FILESIZE(file)
```

* **file:** name of the file in the virtual directory of the pipeline

Let's say you need to obtain the size of the file created one step before the use of the ***File Writer*** component. If its file name configuration in ***File Writer*** was `file.txt`, then use the following extract in the ***JSON Generator*** component:

```
{
"fileSize": {{ FILESIZE("arquivo.txt") }}
}
```

The result would be:

```
{"fileSize": 1000}
```

* **fileSize:** the size of the file (in bytes).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/double-braces/double-braces-functions/file-functions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
