buildPath

abstract fun buildPath(path: JsonObjectPath, value: DataItem, expiry: Expiry)

Edits the DataStore and builds the necessary path according to the given path in order to store the given value.

Where a DataObject/DataList already exists on the given path, the incoming items will be merged in. Where the DataObject/DataList does not exist yet in this DataObject a new one will be created. Where a different type was specified on the path to what is currently in this DataStore, it will be overwritten.

Parameters

path

the JsonObjectPath used to describe where to store value

value

the DataItem to add

expiry

The time frame for this data to remain stored