Manage the recycle bin
Use these methods to empty the recycle bin or restore deleted files and folders.
The options parameter of the IPDSRequestConfig type is encapsulated based on the request config options of axios. For more information, see AxiosRequestConfig.
clearRecycleBin
Empties the recycle bin.
const result = await client.clearRecycleBin(options)
Request parameters
|
Parameter |
Type |
Required |
Description |
|
options |
IPDSRequestConfig |
No |
Other request parameters. |
Response parameters
|
Parameter |
Type |
Required |
Description |
|
result |
IListRes |
Yes |
The returned results. |
IListRes
|
Parameter |
Type |
Required |
Description |
|
items |
array |
Yes |
The list of deleted files or folders. Each element contains the following fields: { domain_id: string drive_id: string task_id: string } Use task_id to query the progress of an asynchronous task. |
batchRestoreFiles
Restores files or folders from the recycle bin.
const result = await client.batchRestoreFiles(params, options)
Request parameters
|
Parameter |
Type |
Required |
Description |
|
params |
IFileKey[] |
No |
The files or folders to restore. Each element is of the IFileKey type. |
|
options |
IPDSRequestConfig |
No |
Other request parameters. |
Response parameters
|
Parameter |
Type |
Required |
Description |
|
result |
object |
Yes |
The returned results. |
result
|
Parameter |
Type |
Required |
Description |
|
successArr |
IFileKey[] |
Yes |
The files or folders that were successfully restored. |
|
errorArr |
IFileKey[] |
Yes |
The files or folders that failed to be restored. |