is there a kotlin way to write this kind of code s...
# codereview
c
is there a kotlin way to write this kind of code shorter:
Copy code
fun tempDir(prefix: String): File {
        val dir = Files.createTempDirectory(prefix).toFile()!!
        dir.deleteOnExit()
        return dir
    }