1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-13 11:50:53 +02:00

51 lines
974 B
Markdown
Raw Normal View History

---
sidebar_position: 5
---
# Create folder
Creates an empty directory on the drive
2024-07-10 13:58:29 +03:00
`Function CreateFolder(Val Token, Val Name, Val Parent = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| Name | --title | String | Folder name |
| Parent | --catalog | String | Parent |
Returns: Map Of KeyAndValue - serialized JSON response from Google
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
Name = "TestFolder";
Response = OPI_GoogleDrive.CreateFolder(Token, Name); //Map
Response = OPI_Tools.JSONString(Response); //String
```
```sh title="CLI command example"
oint gdrive CreateFolder --token %token% --title "TestFolder" --catalog %catalog%
```
```json title="Result"
2024-08-13 16:49:40 +03:00
{
"mimeType": "application/vnd.google-apps.folder",
"name": "TestFolder",
"id": "1fIqr5pJV3QybT5sPeZhBD_0TIvtL5Ovc",
"kind": "drive#file"
}
2024-08-13 16:49:40 +03:00
```