StorageManager
public abstract class StorageManager
源码Source
io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:24–50存储管理器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.sandbox.manager.fs 包。核心成员包括 downloadFolder、uploadFolder、StorageManager、fileSystemConfig。
Storage Manager responsible for handling file downloads from local and cloud storage
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
fileSystemConfigfinal | FileSystemConfig | 文件系统配置字段。 The file system config field. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public StorageManager(FileSystemConfig fileSystemConfig) | 初始化 `StorageManager` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public abstract boolean downloadFolder(String storagePath, String localDir)abstract | 执行 `downloadFolder` 方法。 Download folder from storage to local directory |
public abstract boolean uploadFolder(String localDir, String storagePath)abstract | 执行 `uploadFolder` 方法。 Upload local folder to storage |
字段详情Field Detail
fileSystemConfig
protected final FileSystemConfig fileSystemConfig
final
文件系统配置字段。声明为 protected final FileSystemConfig fileSystemConfig。
The file system config field.
源码Source
io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:27构造器详情Constructor Detail
StorageManager
public StorageManager(FileSystemConfig fileSystemConfig)
初始化 StorageManager 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
fileSystemConfig | FileSystemConfig | 文件系统配置(类型 `FileSystemConfig`)。The file system config. |
源码Source
io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:29–31方法详情Method Detail
downloadFolder
public abstract boolean downloadFolder(String storagePath, String localDir)
abstract
执行 downloadFolder 方法。
Download folder from storage to local directory
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
storagePath | String | 存储路径(类型 `String`)。storage path |
localDir | String | 本地目录(类型 `String`)。local target directory |
boolean返回布尔值,表示判断结果。whether download succeeded
源码Source
io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:40uploadFolder
public abstract boolean uploadFolder(String localDir, String storagePath)
abstract
执行 uploadFolder 方法。
Upload local folder to storage
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
localDir | String | 本地目录(类型 `String`)。local source directory |
storagePath | String | 存储路径(类型 `String`)。storage path |
boolean返回布尔值,表示判断结果。whether upload succeeded
源码Source
io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:49