1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-03 22:39:12 +02:00
Files
OpenIntegrations/docs/en/md/Google_Drive/File-and-directory-management/Create-folder.md

50 lines
1.1 KiB
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"
2024-09-29 19:41:20 +03:00
Token = "ya29.a0AcM612xw6IRwwkQIOEhizd2pJ6LLI4UAhdhxmXDGEzYkcfUPrLYgDDwbsSi5iQdc78WPs_1_Qor5KipuV6mAIvr6z-AKzrBaMT4erIR5T...";
2024-09-29 17:35:23 +03:00
Directory = "191iyaa6-2BCNRPOF0F8mQ0TuNWPNesdM";
2024-09-29 00:25:48 +03:00
Name = "TestFolder";
Result = OPI_GoogleDrive.CreateFolder(Token, Name, Directory);
```
```sh title="CLI command example"
oint gdrive CreateFolder --token %token% --title "TestFolder" --catalog %catalog%
```
```json title="Result"
2024-09-29 21:40:58 +03:00
{
"kind": "drive#file",
"id": "1trgAzkF_pMFm3uLJKeXIUd6K2W3YYhcY",
"name": "TestFolder",
"mimeType": "application/vnd.google-apps.folder"
}
```