跳转到内容

explorer

Lite API 3.1,仅 sidebar/explorer 挂载位置提供。read 同步返回,watch 没有初始回调。状态仅用于展示,不授予文件访问权限。rootDirectory 为 null 表示 Space 根目录,activePath 为 null 表示没有打开的文件。

使用指南: explorer. API 索引.

签名、参数及返回类型从 SDK 自动生成;可选成员不保证在每个宿主和上下文中存在。

源码

支持宿主: Lite

同步读取当前目录树展示状态。

read(): ExplorerState;

返回值: ExplorerState.

支持宿主: Lite

订阅状态变化,不触发初始回调。

watch(listener: (state: ExplorerState) => void): Disposable;
参数 类型 必填
listener (state: ExplorerState) => void 是

返回值: Disposable.

关联类型: ExplorerState, Disposable.