Path: API › 文件管理

`POST /files`

将回收站中的文件或目录恢复到其原始位置。

## Request body

_Required._

- `action129.request_time` (string, required) — Unix 时间戳。
- `action129.request_token` (string, required) — 按 API 概览生成的签名。
- `action129.action` (string, required) — 具体操作名称。
  - one of `"Re_Recycle_bin"`
- `action129.path` (string, required) — 回收站中的文件名（`rname`），如 `_bt_tmp_bt_test.txt_t_1234567890.123`
- `action129.rpath` (string, optional) — 恢复到指定目录（不填则恢复到原始路径）

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "Re_Recycle_bin",
  "path": "string",
  "rpath": "string"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/files" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=Re_Recycle_bin" \
  --data-urlencode "path=<path>"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "status": true,
  "msg": "恢复成功!"
}
```

- `action129.response.default.status` (boolean, optional) — `true` 恢复成功
- `action129.response.default.msg` (string, optional) — `恢复成功!`


## Re_Recycle_bin

将回收站中的文件或目录恢复到其原始位置。

先通过 [Get_Recycle_bin](/api/files/get_recycle_bin) 获取回收站列表，取目标项的 `rname` 字段作为 `path` 参数传入。

- **路由**：`POST /files`
- **action**：`Re_Recycle_bin`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `Re_Recycle_bin` |
| path | 是 | String | 回收站中的文件名（`rname`），如 `_bt_tmp_bt_test.txt_t_1234567890.123` |
| rpath | 否 | String | 恢复到指定目录（不填则恢复到原始路径） |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 恢复成功 |
| msg | String | `恢复成功!` |

## 示例

### 请求

```
POST /files HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=Re_Recycle_bin&path=_bt_tmp_bt_bt_recycle_test.txt_t_1779504311
```

### 响应

```json
{"status": true, "msg": "恢复成功!"}
```

## 相关接口

- [Get_Recycle_bin](/api/files/get_recycle_bin) — 查看回收站列表
- [DeleteDir](/api/files/deletedir) — 删除文件到回收站

