storage
Declare storage.maxBytes. Binary objects are private to the plugin and local to the device, persisting across View and app restarts. read returns null for an absent key. Writes are subject to the declared quota and host limits.
Usage guide: services. API index.
Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.
PluginStorage
Section titled “PluginStorage”PluginStorage.list
Section titled “PluginStorage.list”Supported hosts: Lite
List stored objects, optionally filtered by key prefix.
list(prefix?: string): Promise<Array<{ key: string; size: number;}>>;| Parameter | Type | Required |
|---|---|---|
prefix |
string |
No |
Returns: Promise<Array<{ key: string; size: number; }>>.
PluginStorage.read
Section titled “PluginStorage.read”Supported hosts: Lite
Read object bytes, or null for an absent key.
read(key: string): Promise<Uint8Array | null>;| Parameter | Type | Required |
|---|---|---|
key |
string |
Yes |
Returns: Promise<Uint8Array | null>.
PluginStorage.write
Section titled “PluginStorage.write”Supported hosts: Lite
Write an object within the plugin’s storage quota.
write(key: string, value: Uint8Array): Promise<void>;| Parameter | Type | Required |
|---|---|---|
key |
string |
Yes |
value |
Uint8Array |
Yes |
Returns: Promise<void>.
PluginStorage.delete
Section titled “PluginStorage.delete”Supported hosts: Lite
Delete a private stored object.
delete(key: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
key |
string |
Yes |
Returns: Promise<void>.