listStoreOf

inline fun <T : @Serializable Any> listStoreOf(file: Path, default: List<T> = emptyList(), enableCache: Boolean = true, json: Json = Json { ignoreUnknownKeys = true; encodeDefaults = true }): KStore<List<T>>

Creates a store that contains a list

Return

store that contains a list of type T

Parameters

file

path to the file that is managed by this store

default

returns this value if the file is not found. defaults to empty list

enableCache

maintain a cache. If set to false, it always reads from disk

json

Serializer to use. Defaults serializer ignores unknown keys and encodes the defaults