If I use File.createTempFile(), does it make sure that the file does not already exist before it creates the file? Or do I need to provide some uniqueness with the suffix/prefix info I provide?
posted 13 years ago
I believe this excerpt taken from File.createTempFile javadoc will answer your question.
If this method returns successfully then it is guaranteed that: 1. The file denoted by the returned abstract pathname did not exist before this method was invoked, and 2. Neither this method nor any of its variants will return the same abstract pathname again in the current invocation of the virtual machine.
[ February 27, 2003: Message edited by: Bhupinder Dhillon ]