It is safe to use java's createTempFile method to create a temp file and then rename it and keep it as a permanent file? Or does java or the system in some way keep track of its temporary files and delete them at some point?
btw..this is related to Mac OS X specifically.
Unless you call the deleteOnExit() method on the file object, it will remain after the application terminates.
It is best however to create the file on your directory and not in the default directory (usually /tmp) which may be erased by the OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With