DirEntry
public class DirEntry extends WorkspaceEntry
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:27–72目录条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.sandbox.layout 包,继承自 WorkspaceEntry。核心成员包括 getChildren、setChildren、child、DirEntry。
Layout entry that creates a directory, optionally with nested child entries.
Child entries are a map of filename to WorkspaceEntry and may themselves be
nested DirEntry instances, enabling recursive tree-like workspace structures.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public DirEntry() | 初始化 `DirEntry` 实例。 Creates an empty directory entry. |
public DirEntry(Map<String, WorkspaceEntry> children) | 初始化 `DirEntry` 实例。 Creates a directory entry with the given children. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Map<String, WorkspaceEntry> getChildren() | 返回子级条目 in 此目录。 Returns the child entries in this directory. |
public void setChildren(Map<String, WorkspaceEntry> children) | 设置子级条目用于此目录。 Sets the child entries for this directory. |
public DirEntry child(String name, WorkspaceEntry entry) | 执行子级相关操作。 Adds a child entry to this directory. |
构造器详情Constructor Detail
DirEntry
public DirEntry()
初始化 DirEntry 实例。
Creates an empty directory entry.
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:32DirEntry
public DirEntry(Map<String, WorkspaceEntry> children)
初始化 DirEntry 实例。
Creates a directory entry with the given children.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
children | Map<String, WorkspaceEntry> | 子级名称到子级条目的映射。map of child name to child entry |
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:39–41方法详情Method Detail
getChildren
public Map<String, WorkspaceEntry> getChildren()
返回子级条目 in 此目录。
Returns the child entries in this directory.
Map<String, WorkspaceEntry>子级名称到子级条目的可变映射。mutable map of child name to child entry
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:48–50setChildren
public void setChildren(Map<String, WorkspaceEntry> children)
设置子级条目用于此目录。
Sets the child entries for this directory.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
children | Map<String, WorkspaceEntry> | 子级名称到子级条目的映射。map of child name to child entry |
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:57–59child
public DirEntry child(String name, WorkspaceEntry entry)
执行子级相关操作。
Adds a child entry to this directory.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。child filename |
entry | WorkspaceEntry | 条目(类型 `WorkspaceEntry`)。child entry |
DirEntry返回DirEntry。this instance for chaining
源码Source
io/agentscope/harness/agent/sandbox/layout/DirEntry.java:68–71