Posted By

alejandrosuch on 04/12/10


Tagged

file java temp


Versions (?)

Generate temporary filename (on system's temp path)


 / Published in: Java
 

  1. private String getTmpFileName() {
  2. String tmpdir = System.getProperty(JAVA_IO_TMPDIR);
  3. String separador = System.getProperty(FILE_SEPARATOR);
  4.  
  5. if(!tmpdir.endsWith(separador)){
  6. tmpdir+= separador;
  7. }
  8.  
  9. return tmpdir+"tmp_"+UUIDGenFactory.getUUIDGen().nextUUID()+".tmp";
  10. }

Report this snippet  

You need to login to post a comment.