1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/Yandex_Disk/File-and-folder-management/Create-folder.mdx

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 2
2025-05-05 11:15:20 +03:00
description: Create folder and other functions to work with Yandex Disk in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
2025-05-05 09:49:19 +03:00
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Yandex Disk]
2024-10-15 10:16:04 +03:00
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Create folder
Creates a directory on the disk
`Function CreateFolder(Val Token, Val Path) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| Path | --path | String | ✔ | Path to the created folder |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2025-06-29 14:35:33 +03:00
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
2024-10-15 10:16:04 +03:00
Path = "/" + String(New UUID);
Result = OPI_YandexDisk.CreateFolder(Token, Path);
```
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint yadisk CreateFolder \
2024-10-22 08:59:24 +03:00
--token "***" \
2025-07-15 23:11:07 +03:00
--path "/0c3d01a0-11fb-449b-842f-977d38d65f19"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint yadisk CreateFolder ^
2024-10-22 08:59:24 +03:00
--token "***" ^
2025-07-15 23:11:07 +03:00
--path "/0c3d01a0-11fb-449b-842f-977d38d65f19"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
2024-10-15 10:16:04 +03:00
```json title="Result"
{
"_embedded": {
"sort": "",
"items": [],
"limit": 20,
"offset": 0,
"path": "disk:/81da8ff8-4975-43d1-aebc-dbffba560d71",
"total": 0
},
"name": "81da8ff8-4975-43d1-aebc-dbffba560d71",
"exif": {},
"resource_id": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880",
"created": "2024-10-09T09:07:49+03:00",
"modified": "2024-10-09T09:07:49+03:00",
"path": "disk:/81da8ff8-4975-43d1-aebc-dbffba560d71",
"comment_ids": {
"private_resource": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880",
"public_resource": "1573541518:f9053a23fcfa0c3d45a2c95c14f9afe70c7954cdbb35c58bf2f16a61ed289880"
},
"type": "dir",
"revision": 1728454069973169
}
```