public static File createTemporaryDirectory(String prefix){
  while (true) {
    String candidateName=prefix + TEMPORARY_DIRECTORY_PRNG.nextInt();
    File result=new File(System.getProperty("java.io.tmpdir"),candidateName);
    if (result.mkdir()) {
      return result;
    }
  }
}

public static File createTemporaryDirectory ( String prefix ) { while ( true ) { String candidateName = prefix + TEMPORARY_DIRECTORY_PRNG . nextInt ( ) ; File result = new File ( System . getProperty ( "java.io.tmpdir" ) , candidateName ) ; if ( result . mkdir ( ) ) { return result ; } } }
creates a unique new temporary directory under " java . io . tmpdir " .
