Java tutorial
import java.io.File; import java.io.IOException; public class Utils { /** * Creates a new empty temporary directory. */ public static File createTmpDir() throws IOException { // create a temporary directory File tmpFile = File.createTempFile("tmp", "tmp", new File(".")); tmpFile.delete(); tmpFile.mkdir(); return tmpFile; } }