I am trying to read lines of a file and putting values in a list but I keep getting an ENOENT. I use the relative file path. How should I correct this? Code:
val inputStream: InputStream = File("cards.txt").inputStream()
val lineList = mutableListOf<String>()
inputStream.bufferedReader().forEachLine { lineList.add(it) }
lineList.forEach{println("> " + it)}
Error:
android.system.ErrnoException: open failed: ENOENT (No such file or directory)