Path: API › 文件管理

`POST /files`

切换文件回收站功能的开启/关闭状态。若回收站关闭，删除的文件将被直接永久删除。

## Request body

_Required._

- `action130.request_time` (string, required) — Unix 时间戳。
- `action130.request_token` (string, required) — 按 API 概览生成的签名。
- `action130.action` (string, required) — 具体操作名称。
  - one of `"Recycle_bin"`
- `action130.db` (string, optional) — 传任意值则操作数据库回收站而非文件回收站

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "Recycle_bin",
  "db": "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=Recycle_bin"
```

## Responses

### default

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

#### Example

```json
{
  "status": true,
  "msg": "已关闭回收站功能!"
}
```

- `action130.response.default.status` (boolean, optional) — `true` 操作成功
- `action130.response.default.msg` (string, optional) — `FILE_ON_RECYCLE_BIN`（已开启）或 `FILE_OFF_RECYCLE_BIN`（已关闭）


## Recycle_bin

切换文件回收站功能的开启/关闭状态。若回收站关闭，删除的文件将被直接永久删除。

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

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `Recycle_bin` |
| db | 否 | String | 传任意值则操作数据库回收站而非文件回收站 |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 操作成功 |
| msg | String | `FILE_ON_RECYCLE_BIN`（已开启）或 `FILE_OFF_RECYCLE_BIN`（已关闭） |

## 示例

### 请求

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

action=Recycle_bin
```

### 响应

```json
{"status": true, "msg": "已关闭回收站功能!"}
```

