2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 4
|
|
|
|
---
|
|
|
|
|
|
|
|
# Delete object
|
|
|
|
Deletes an object at the specified path
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function DeleteObject(Val Token, Val Path, Val ToCart = True) Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Token |
|
|
|
|
| Path | --path | String | Path to the folder or file to be deleted |
|
|
|
|
| ToCart | --can | Boolean | To cart |
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Yandex
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-07-10 13:05:58 +02:00
|
|
|
<br/>
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
2024-08-14 15:14:55 +02:00
|
|
|
Token = "y0_AgAAAABdylaOAAs0QgAAAAD5i-a...";
|
2024-09-10 12:48:11 +02:00
|
|
|
Path = "/0eaac754-f8b1-4407-ab2d-80ecf7c73b6b.png";
|
2024-08-14 15:14:55 +02:00
|
|
|
|
|
|
|
Result = OPI_YandexDisk.DeleteObject(Token, Path, False);
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|
2024-08-13 14:52:26 +02:00
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
oint yadisk DeleteObject --token "y0_AgAAAABdylaOAA..." --path "/Alpaca.png" --can %can%
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-08-14 08:06:31 +02:00
|
|
|
<empty string>
|
2024-06-05 12:19:46 +02:00
|
|
|
```
|