How to read a text file from resources in Kotlin?

val fileContent = MySpec::class.java.getResource("/html/file.html").readText()

Leave a Comment