klip

fun klip(update: Boolean, path: String, key: String, source: () -> String): String

Writes or returns klip depending on the working mode.

Return

read klip if it exists and update== false or persisted value that was provided by source otherwise

Parameters

update

whether the klip should be overridden instead of asserted

path

file path to retrieve and save klip for the given context

key

key to read or write the klip under in the file at path

source

a provider for a string representation to persist