Here you can find the source of createTempDir(final String prefix)
public static Path createTempDir(final String prefix)
//package com.java2s; //License from project: Open Source License import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static Path createTempDir() { return createTempDir(""); }//from www . ja va 2s .c om public static Path createTempDir(final String prefix) { try { return Files.createTempDirectory(prefix); } catch (IOException ex) { ex.printStackTrace(); } return null; } }