RosettaCodeData/Task/Secure-temporary-file/Kotlin/secure-temporary-file.kotlin
2023-09-16 17:28:03 -07:00

8 lines
234 B
Text

import kotlin.io.path.createTempFile
import kotlin.io.path.deleteExisting
fun main() {
val tempFilePath = createTempFile("example", ".tmp")
println("Temporary file created: $tempFilePath")
tempFilePath.deleteExisting()
}