NativeAppStorage Class

A local file stored in the NativeHost.appSettingsCacheDir for storing key/value pairs.

Methods

Name Description
close(deleteFile: boolean = false): void Close this Storage.  
getBoolean(key: string): undefined | boolean Get the value for a key as a boolean.  
getData(key: string): undefined | StorageValue Get the value for a key from this Storage.  
getKeys(): string[] Get all key names in this Storage  
getNumber(key: string): undefined | number Get the value for a key as a number.  
getString(key: string): undefined | string Get the value for a key as a string.  
getUint8Array(key: string): undefined | Uint8Array Get the value for a key as a Uint8Array.  
removeAll(): void Remove all key/value pairs  
removeData(key: string): void Remove a key/value pair from this Storage  
setData(key: string, value: StorageValue): void Set the value for a key  
find(name: string): NativeAppStorage Static find and open storage by its name.  
open(name: string): NativeAppStorage Static Open or find a Storage by name.  

Properties

Name Type Description
id Readonly string    

Defined in

Last Updated: 11 June, 2024