Here you can find the source of getTempDirFilePath(String name)
public static String getTempDirFilePath(String name)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Red Hat, Inc. /*from w ww . jav a 2 s . c o m*/ * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ import java.io.File; public class Main { private static final String JAVA_IO_TEMP = "java.io.tmpdir"; public static String getTempDirFilePath(String name) { return new File(getTempDirectory(), name).getAbsolutePath(); } public static String getTempDirFilePath() { return getTempDirFilePath(createRandomFilename()); } public static String getTempDirectory() { return System.getProperty(JAVA_IO_TEMP); } public static String createRandomFilename() { return String.valueOf(System.currentTimeMillis()); } }