to list files in a directory with kotlin, i used list() and listFiles() functions:
File(\"/tmp\").list().forEach { println(it) } File(\"/tmp\").listFiles().forEa
Use one of .walk(...), .walkBottomUp() or .walkTopDown() extensions for File, which differ only in the order in which the files appear and all produce a FileTreeWalk, that implements Sequence:
File
File("/tmp").walkTopDown().forEach { println(it) }