KlipManager

object KlipManager

A helper class to assist in reading and writing persisted klips

Functions

klip
Link copied to clipboard
common
fun klip(update: Boolean, path: String, key: String, source: () -> String): String
Writes or returns klip depending on the working mode.
readKlip
Link copied to clipboard
common
fun readKlip(path: String, key: String, source: () -> String): String
Reads a klip from a klip file specified by path under given key.
stringifyKlip
Link copied to clipboard
common
fun stringifyKlip(key: String, source: () -> String): String
Converts a key and a klip provided by source to a writable form that's safe to append to klip file.
writeKlip
Link copied to clipboard
common
fun writeKlip(path: String, key: String, source: () -> String): String
Writes and returns a klip provided by source to a klip file specified by path under given key.