java.lang.Object
io.agentscope.harness.agent.sandbox.layout.WorkspaceEntry
io.agentscope.harness.agent.sandbox.layout.DirEntry

public class DirEntry extends WorkspaceEntry
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 Details

    • DirEntry

      public DirEntry()
      Creates an empty directory entry.
    • DirEntry

      public DirEntry(Map<String,WorkspaceEntry> children)
      Creates a directory entry with the given children.
      Parameters:
      children - map of child name to child entry
  • Method Details

    • getChildren

      public Map<String,WorkspaceEntry> getChildren()
      Returns the child entries in this directory.
      Returns:
      mutable map of child name to child entry
    • setChildren

      public void setChildren(Map<String,WorkspaceEntry> children)
      Sets the child entries for this directory.
      Parameters:
      children - map of child name to child entry
    • child

      public DirEntry child(String name, WorkspaceEntry entry)
      Adds a child entry to this directory.
      Parameters:
      name - child filename
      entry - child entry
      Returns:
      this instance for chaining