FileUploadResponse
public record FileUploadResponse(String path, String error)
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:24–37承载文件上传响应数据的记录类型。位于 io.agentscope.harness.agent.filesystem.model 包。核心成员包括 path、error、success、fail、isSuccess。
Result of a single file upload operation.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
path | String | 执行路径相关操作。 the file path that was requested |
error | String | 执行错误相关操作。 error description on failure, `null` on success |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static FileUploadResponse success(String path)static | 设置成功。 Performs the success operation. |
public static FileUploadResponse fail(String path, String error)static | 执行 `fail` 方法。 Performs the fail operation. |
public boolean isSuccess() | 判断是否成功。 Returns whether the success. |
记录组件详情Record Component Detail
path
String path执行路径相关操作。
the file path that was requested
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:24–37error
String error执行错误相关操作。
error description on failure, null on success
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:24–37方法详情Method Detail
success
public static FileUploadResponse success(String path)
static
设置成功。
Performs the success operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
FileUploadResponse返回FileUploadResponse。Returns file upload response.
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:26–28fail
public static FileUploadResponse fail(String path, String error)
static
执行 fail 方法。
Performs the fail operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
error | String | 错误(类型 `String`)。The error. |
FileUploadResponse返回FileUploadResponse。Returns file upload response.
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:30–32isSuccess
public boolean isSuccess()
判断是否成功。
Returns whether the success.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/harness/agent/filesystem/model/FileUploadResponse.java:34–36