AS AgentScopeAPI 手册 / API Reference

LocalFileEntry

public class LocalFileEntry extends WorkspaceEntry
源码Source io/agentscope/harness/agent/sandbox/layout/LocalFileEntry.java:24–57

本地文件条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.layout 包,继承自 WorkspaceEntry。核心成员包括 getSourcePath、setSourcePath、LocalFileEntry。

Layout entry that copies a single file from the host filesystem into the sandbox workspace.

The sourcePath is an absolute path on the host machine. It is stored as a string to ensure safe JSON serialization across platforms.

构造器摘要Constructor Summary

构造器Constructor说明Description
public LocalFileEntry()
初始化 `LocalFileEntry` 实例。
Creates an empty local file entry.
public LocalFileEntry(String sourcePath)
初始化 `LocalFileEntry` 实例。
Creates a local file entry with the given host source path.

方法摘要Method Summary

方法Method说明Description
public String getSourcePath()
获取来源路径。
Returns the host-side source path.
public void setSourcePath(String sourcePath)
设置来源路径。
Sets the host-side source path.

构造器详情Constructor Detail

LocalFileEntry

public LocalFileEntry()

初始化 LocalFileEntry 实例。

Creates an empty local file entry.

源码Source io/agentscope/harness/agent/sandbox/layout/LocalFileEntry.java:29

LocalFileEntry

public LocalFileEntry(String sourcePath)

初始化 LocalFileEntry 实例。

Creates a local file entry with the given host source path.

参数Parameters
名称Name类型Type说明Description
sourcePathString来源路径(类型 `String`)。absolute path on the host filesystem
源码Source io/agentscope/harness/agent/sandbox/layout/LocalFileEntry.java:36–38

方法详情Method Detail

getSourcePath

public String getSourcePath()

获取来源路径。

Returns the host-side source path.

返回Returns String
返回字符串结果。absolute host path as a string
源码Source io/agentscope/harness/agent/sandbox/layout/LocalFileEntry.java:45–47

setSourcePath

public void setSourcePath(String sourcePath)

设置来源路径。

Sets the host-side source path.

参数Parameters
名称Name类型Type说明Description
sourcePathString来源路径(类型 `String`)。absolute host path as a string
源码Source io/agentscope/harness/agent/sandbox/layout/LocalFileEntry.java:54–56

继承成员Inherited Members

继承自Methods inherited from WorkspaceEntry
基于官方固定版本源码静态生成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.