Here you can find the source of createTmpDir(Path tmpDir, String prefix)
public static Path createTmpDir(Path tmpDir, String prefix) throws IOException
//package com.java2s; /**//from ww w . j a v a2s . c o m * Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium) * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static Path createTmpDir(Path tmpDir, String prefix) throws IOException { if (tmpDir == null) { return Files.createTempDirectory(prefix); } else { return Files.createTempDirectory(tmpDir, prefix); } } }