Here you can find the source of makeTemporaryDirectory()
public static File makeTemporaryDirectory()
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.IOException; public class Main { public static File makeTemporaryDirectory(String prefix, String suffix) { try {/*from w w w . j a v a 2 s.c o m*/ File f = File.createTempFile(prefix, suffix); f.delete(); f.mkdir(); return f; } catch (IOException e) { throw new RuntimeException(e); } } public static File makeTemporaryDirectory() { return makeTemporaryDirectory("kiradb", ".index"); } }