# fileName

### fileName

The [circuit config file](https://zefi.gitbook.io/circomjs/circuit-config-file) has a field `fileName` for every circuit declared inside `circuits`.

This value of this field is used to resolve the file path of your circuit and helps CircomJS from it.

The resolved file path is `inputDIR`/`fileName`. The below diagram illustrates this.

<figure><img src="https://2197554927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9Aip7tCnENWgfV4SAnlA%2Fuploads%2FxpI4WxLWQQogPJI60APW%2Fimage.png?alt=media&#x26;token=093b52f9-a247-4d10-b864-b5ff6bd514e2" alt=""><figcaption><p>filepath resolution of circuit</p></figcaption></figure>

In the above scenario, the `fileName` is "multiply.circom", hence the file path where CircomJS will look for this circuit, will be at `inputDIR`/`fileName`, i.e `./circuits/multiply.circom`.

#### What about nested file paths?

What if your circuit is inside a `multiply` directory? Then you should assign the following value to `fileName`->`multiply/multiply.circom`, this way CircomJS will look inside `inputDir`/`multiply` directory for a Circom file with the name `multiply.circom`.

<figure><img src="https://2197554927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9Aip7tCnENWgfV4SAnlA%2Fuploads%2FtQe1UI0yYp5WaVq5Jlt7%2Fimage.png?alt=media&#x26;token=33f78503-a9f1-4b8d-97bb-9bd6127e89f9" alt=""><figcaption><p>filepath resolution for circuits with nested structure.</p></figcaption></figure>

{% hint style="info" %}
The above-described method of file resolution only applies for **`fileName`** field, all other file paths are resolved relative to the current working directory.<br>

For example in the above diagram, **powerOfTauFp** **will be resolved relative to the current working directory, and not relative to`inputDir`.**
{% endhint %}


---

# 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://zefi.gitbook.io/circomjs/circuit-config-file/filename.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.
