> 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"
}
```
