This topic describes the methods used to manage the recycle bin.
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 information about deleted files or folders. Each element contains the following parameters: { domain_id: string drive_id: string task_id: string } You can use the task_id parameter 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 information about the files or folders to be restored. The value of 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 are managed. |
errorArr | IFileKey[] | Yes | The files or folders that failed to be managed. |