AS AgentScopeAPI 手册 / API Reference

GlobResult

public record GlobResult(String error, List<FileInfo> matches)
源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:26–39

承载 Glob 结果数据的记录类型。位于 io.agentscope.harness.agent.filesystem.model 包。核心成员包括 error、matches、success、fail、isSuccess。

Result from abstract filesystem glob operations.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
errorString
执行错误相关操作。
error message on failure, `null` on success
matchesList<FileInfo>
执行 `matches` 方法。
list of matching file info entries on success, `null` on failure

方法摘要Method Summary

方法Method说明Description
public static GlobResult success(List<FileInfo> matches)
static
设置成功。
Performs the success operation.
public static GlobResult fail(String error)
static
设置该参数。
Performs the fail operation.
public boolean isSuccess()
判断是否成功。
Returns whether the success.

记录组件详情Record Component Detail

error

String error

执行错误相关操作。

error message on failure, null on success

源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:26–39

matches

List<FileInfo> matches

执行 matches 方法。

list of matching file info entries on success, null on failure

源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:26–39

方法详情Method Detail

success

public static GlobResult success(List<FileInfo> matches)
static

设置成功。

Performs the success operation.

参数Parameters
名称Name类型Type说明Description
matchesList<FileInfo>matches(类型 `List`)。The matches.
返回Returns GlobResult
返回GlobResult。Returns glob result.
源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:28–30

fail

public static GlobResult fail(String error)
static

设置该参数。

Performs the fail operation.

参数Parameters
名称Name类型Type说明Description
errorString错误(类型 `String`)。The error.
返回Returns GlobResult
返回GlobResult。Returns glob result.
源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:32–34

isSuccess

public boolean isSuccess()

判断是否成功。

Returns whether the success.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/filesystem/model/GlobResult.java:36–38
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.