Secure temporary file: Difference between revisions
→{{header|Kotlin}}: Change to use more secure method
(→{{header|Kotlin}}: Change to use more secure method) |
|||
Line 395:
=={{header|Kotlin}}==
<syntaxhighlight lang="
import kotlin.io.path.deleteExisting
fun main() {
println("Temporary file created: $tempFilePath")
tempFilePath.deleteExisting()
▲ val tf = File.createTempFile("temp", ".tmp")
}</syntaxhighlight>
Sample output
{{out}}
<pre>
Temporary file created: /tmp/example14437465325231438926.tmp
</pre>
|