Here you can find the source of getTempDirectory()
public static File getTempDirectory()
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { static boolean tempCreated = false; public static File getTempDirectory() { final File tempDirectory = new File( System.getProperty("java.io.tmpdir"), "gluster-test-mount-point"); //initialize? if (!tempCreated) { tempDirectory.mkdirs();/*from w w w . ja v a 2s . c om*/ tempDirectory.delete(); tempDirectory.mkdir(); } tempCreated = true; return tempDirectory; } }