public static String mkTmpDir(String prefix) throws IOException {
  File tmpDir=File.createTempFile(prefix,"");
  if (!tmpDir.delete())   throw new IOException();
  if (!tmpDir.mkdir())   throw new IOException();
  return tmpDir.getCanonicalPath();
}

public static String mkTmpDir ( String prefix ) throws IOException { File tmpDir = File . createTempFile ( prefix , "" ) ; if ( ! tmpDir . delete ( ) ) throw new IOException ( ) ; if ( ! tmpDir . mkdir ( ) ) throw new IOException ( ) ; return tmpDir . getCanonicalPath ( ) ; }
creates a temporary directory and returns its name . if this already exists , then it is deleted .
