-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary file creation support #391
Comments
You can use https://kotlin.github.io/kotlinx-io/kotlinx-io-core/kotlinx.io.files/-system-temporary-directory.html to get the location of the system temp dir. Producing a random file name, creating the file, and (optionally) deleting it when you're done are up to you using the regular FS APIs. |
Kotlin 2.0.20's |
Woow, I hadn't found that, thank you! |
Reopening the issue as it still makes sense to have a built-in function for temp file creation. |
Maybe consider changing |
This forces all temporary files into that one location; it may be the case that one wants to create temp files elsewhere. |
That's correct, and is the entire point of the temporary path provided by the OS which is available solely on the system file system. If you want to create a temporary file elsewhere on the system file system or within file systems other than the system file system then you are free to do so on your own. |
Hello, it's possible to create a temporary file like in jvm File.createTempFile()?
The text was updated successfully, but these errors were encountered: