1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-27 23:07:37 +02:00
Vitaly the Alpaca (bot) 1cc91447b0 Main build (Jenkins)
2025-01-12 13:07:21 +03:00

66 lines
1.4 KiB
Plaintext
Vendored

---
sidebar_position: 5
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Create folder
Creates an empty directory on the drive
`Function CreateFolder(Val Token, Val Name, Val Parent = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Name | --title | String | ✔ | Folder name |
| Parent | --catalog | String | ✖ | Parent |
Returns: Map Of KeyAndValue - serialized JSON response from Google
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Token = "ya29.a0ARW5m7702-Ib_bOq69krqD5iUx89SC2lxGPxRJoBjqvSBqE7uKghOyAjwrL7ebNf6xqPzwD4wQfZlFvBrb7QsWlw5PGW_SvkFr57Y8Js...";
Directory = "11Mo30odYPEtBBU_0OndFx5dz1kP7tu-Y";
Name = "TestFolder";
Result = OPI_GoogleDrive.CreateFolder(Token, Name, Directory);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint gdrive CreateFolder \
--token "***" \
--title "TestFolder"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint gdrive CreateFolder ^
--token "***" ^
--title "TestFolder"
```
</TabItem>
</Tabs>
```json title="Result"
{
"kind": "drive#file",
"id": "1grSYVEN_m8PfHLj5ZrpDyMqDEtbF00E9",
"name": "TestFolder",
"mimeType": "application/vnd.google-apps.folder"
}
```