java - File.createTempFile check if file exists? -
if use method, , chance there temporary file same name, file overwritten? i'm talking application generate many temporary files, long time.
from javadoc on createtempfile
(here) on line labeled 2
,
neither method nor of variants return same abstract pathname again in current invocation of virtual machine.
edit
and returns section says
an abstract pathname denoting newly-created empty file
and, further states
creates new empty file in specified directory, using given prefix , suffix strings generate name. if method returns guaranteed that: file denoted returned abstract pathname did not exist before method invoked
Comments
Post a Comment