B4J Question How To Save KeyValueStore to Disk

cklester

Well-Known Member
Licensed User
How do I save a KVS to disk? I searched "save keyvaluestore" and none of those threads actually explain how to save the KVS to disk. Unless I missed it... which is very possible. :D
 

OliverA

Expert
Licensed User
Longtime User
It does it for you. Nothing special needed
 
Upvote 0

cklester

Well-Known Member
Licensed User
When you initialize itm you must pass the directory in which it will be saved.
B4X:
Dim kvs As KeyValueStore
kvs.Initialize(File.DirApp, "FileName") ' application folder (objects folder)
'or
kvs.Initialize(File.DirData, "FileName") ' windows user data folder

Ah, OK. Does this work if the file already exists? The data is saved between runs of the app?
 
Upvote 0
Top