public static File createTempPath(String path) throws IOException {
  String sep=File.separator;
  File tempDir=new File(System.getProperty("java.io.tmpdir") + sep + path);
  if (!tempDir.exists())   if (!tempDir.mkdirs()) {
    boolean status=tempDir.delete();
    throw new IOException("creation failed for dir " + tempDir + "status = "+ status);
  }
  tempDir.deleteOnExit();
  return tempDir;
}

public static File createTempPath ( String path ) throws IOException { String sep = File . separator ; File tempDir = new File ( System . getProperty ( "java.io.tmpdir" ) + sep + path ) ; if ( ! tempDir . exists ( ) ) if ( ! tempDir . mkdirs ( ) ) { boolean status = tempDir . delete ( ) ; throw new IOException ( "creation failed for dir " + tempDir + "status = " + status ) ; } tempDir . deleteOnExit ( ) ; return tempDir ; }
create a hierarchy of directories ( a path ) in the designated temp dir . if the jvm terminates normally , these will be cleaned up .
