Here you can find the source of createTempDirectory(final String path, final String prefix)
public static Path createTempDirectory(final String path, final String prefix) throws Exception
//package com.java2s; //License from project: Open Source License import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static Path createTempDirectory(final String path, final String prefix) throws Exception { FileSystem fs = FileSystems.getDefault(); Path temp = Files.createTempDirectory(fs.getPath(path), prefix); return temp; }/*from ww w . j a v a 2 s.com*/ }