loadTextFromDisk

fun Document.loadTextFromDisk(accept: String = "", encoding: String = "UTF-8", onError: LoadContext.() -> Unit = {}, onLoad: LoadContext.(String) -> Unit)(source)

Like loadFromDisk but convenient for dealing with text files.

See loadFromDisk for details about the parameters.

See also

FileReader.readAsText