AS AgentScopeAPI 手册 / API Reference

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
fileSystemConfig
final
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
fileSystemConfigFileSystemConfig文件系统配置(类型 `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
storagePathString存储路径(类型 `String`)。storage path
localDirString本地目录(类型 `String`)。local target directory
返回Returns boolean
返回布尔值,表示判断结果。whether download succeeded
源码Source io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:40

uploadFolder

public abstract boolean uploadFolder(String localDir, String storagePath)
abstract

执行 uploadFolder 方法。

Upload local folder to storage

参数Parameters
名称Name类型Type说明Description
localDirString本地目录(类型 `String`)。local source directory
storagePathString存储路径(类型 `String`)。storage path
返回Returns boolean
返回布尔值,表示判断结果。whether upload succeeded
源码Source io/agentscope/runtime/sandbox/manager/fs/StorageManager.java:49
基于官方固定版本源码静态生成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.