filemeta
Lite API 3.1。声明 workspace.filemeta.namespaces;patch 还需 filemeta.write 和贡献点的 write 权限。路径相对 Space。缺失命名空间返回空对象。patch 保留其他键;null 是值,remove 才删除键。数据上限 1 MiB,文件系统可能有更低限制。属性权限不包含文件内容写入。
签名、参数及返回类型从 SDK 自动生成;可选成员不保证在每个宿主和上下文中存在。
PluginFileMeta
Section titled “PluginFileMeta”PluginFileMeta.read
Section titled “PluginFileMeta.read”支持宿主: Lite
读取完整命名空间对象,缺失时返回空对象。
read(path: string, namespace: string): Promise<FileMetaValues>;| 参数 | 类型 | 必填 |
|---|---|---|
path |
string |
是 |
namespace |
string |
是 |
返回值: Promise<FileMetaValues>.
PluginFileMeta.patch
Section titled “PluginFileMeta.patch”支持宿主: Lite
设置或删除指定键,同时保留其他键。
patch(path: string, namespace: string, patch: FileMetaPatch): Promise<FileMetaValues>;| 参数 | 类型 | 必填 |
|---|---|---|
path |
string |
是 |
namespace |
string |
是 |
patch |
FileMetaPatch |
是 |
返回值: Promise<FileMetaValues>.
关联类型: FileMetaValues, FileMetaPatch.