NativeAppStorage Class

Beta  

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): boolean | undefined Get the value for a key as a boolean.  
getData(key: string): StorageValue | undefined Get the value for a key from this Storage.  
getKeys(): string[] Get all key names in this Storage  
getNumber(key: string): number | undefined Get the value for a key as a number.  
getString(key: string): string | undefined Get the value for a key as a string.  
getUint8Array(key: string): Uint8Array | undefined 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.  

Defined in

Last Updated: 25 March, 2021