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): 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. | |
| getValueType(key: string): undefined | "string" | "number" | "boolean" | "Uint8Array" | "null" | return the type of the value for a key, or undefined if not present. | |
| hasNullValue(key: string): boolean | return true if the key is present, but has a null value. |
|
| 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
- backend/src/NativeAppStorage.ts Line 23
Last Updated: 30 November, 2023