From what I know you can find the path of a file in the internal storage with java simply by using:
String path = context.getFilesDir().getAbsolutePath();
File file = new File(path + "/filename");
But how do I do this using kotlin?
From what I know you can find the path of a file in the internal storage with java simply by using:
String path = context.getFilesDir().getAbsolutePath();
File file = new File(path + "/filename");
But how do I do this using kotlin?
In Kotlin, when you see a getter method from a Java class, you can omit the get, change the first letter to lower-case, and use it like a Kotlin property:
val path = context.filesDir.absolutePath
val file = File("$path/filename")