I\'m still pretty much a beginner in kotlin and android studio. I can access most of the android widgets but I cannot access files and so far I managed to come across only the f
In 5 lines: create file to internal directory if not exists, write to file, read file
val file = File(ctx.filesDir, FILE_NAME) file.createNewFile() file.appendText("record goes here") val readResult = FileInputStream(file).bufferedReader().use { it.readText() } println("readResult=$readResult")