> For the complete documentation index, see [llms.txt](https://docs.eueno.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eueno.io/eueno-libraries/eueno-lib-browser/createfolder.md).

# createFolder()

## Syntax

```javascript
createFolder(folderName: string, token: string, currentPathArray: string[])
```

Create new folder in a project or a parent folder.

## Parameters

<table><thead><tr><th width="181">Name</th><th width="121">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>folderName</td><td>string</td><td>Yes</td><td>The name of folder.</td></tr><tr><td>token</td><td>string</td><td>No</td><td>The authentication token response from Eueno API when login. After login, this token was saved in local storage with the name “eueno-token".</td></tr><tr><td>currentPathArray</td><td>array</td><td>Yes</td><td>Array includes projectId and parents folder's name. If we join array with slash “/”, we will get the path to access the new folder.</td></tr></tbody></table>

## Example

```javascript
import { createFolder } from "@eueno/lib-browser"; 

let folderName = "NewFolder";
let currentPathArray = ["112", "ParentFolder"]; // 112 is projectId

const onSubmit = async () => {
   try {
     const response = await createFolder(folderName, token, currentPathArray);
     if (response?.status == 200) {
       console.log("Folder created");
     }
   } catch (error) {
     console.error(error);
   }
 };
```

Response of example:

```javascript
{
     "name": "NewFolder",
     "path": "ParentFolder/NewFolder"
}
```


---

# 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 dynamically by asking a question.

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

```
GET https://docs.eueno.io/eueno-libraries/eueno-lib-browser/createfolder.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.
