android-components / mozilla.components.support.ktx.util / readAndDeserialize

readAndDeserialize

inline fun <T> <ERROR CLASS>.readAndDeserialize(block: (String) -> T): T? (source)

Reads an AtomicFile and provides a deserialized version of its content.

Parameters

block - A function to be executed after the file is read and provides the content as a String. It is expected that this function returns a deserialized version of the content of the file.