MoveFileTool
public class MoveFileTool extends FsSandboxTool
源码Source
io/agentscope/runtime/sandbox/tools/fs/MoveFileTool.java:29–75Move 文件工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools.fs 包,继承自 FsSandboxTool。核心成员包括 bind、fs_move_file、MoveFileTool。
A class in io.agentscope.runtime.sandbox.tools.fs that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.fs. Extends FsSandboxTool.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public MoveFileTool() | 初始化 `MoveFileTool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SandboxTool bind(Sandbox sandbox) | 设置该参数。 Performs the bind operation. |
public String fs_move_file(String source, String destination) | 执行 `fs_move_file` 方法。 Performs the fs move file operation. |
构造器详情Constructor Detail
MoveFileTool
public MoveFileTool()
初始化 MoveFileTool 实例。
Creates a new instance.
源码Source
io/agentscope/runtime/sandbox/tools/fs/MoveFileTool.java:33–55方法详情Method Detail
bind
public SandboxTool bind(Sandbox sandbox)
设置该参数。
Performs the bind operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sandbox | Sandbox | 沙箱(类型 `Sandbox`)。The sandbox. |
SandboxTool返回SandboxTool。Returns sandbox tool.
源码Source
io/agentscope/runtime/sandbox/tools/fs/MoveFileTool.java:57–61fs_move_file
public String fs_move_file(String source, String destination)
执行 fs_move_file 方法。
Performs the fs move file operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
source | String | 来源(类型 `String`)。The source. |
destination | String | 目标地址(类型 `String`)。The destination. |
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/fs/MoveFileTool.java:63–74