Java Temp Directory Get getTempDir()

Here you can find the source of getTempDir()

Description

Get the temp dir.

License

Creative Commons License

Declaration

public static String getTempDir() 

Method Source Code

//package com.java2s;
/*/*from   w ww  .ja  v  a2s  . c o  m*/
 * This work is licensed under the Creative Commons Attribution 3.0 Unported
 * License. To view a copy of this license, visit
 * http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative
 * Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
 */

public class Main {
    /**
     * Get the temp dir.
     *
     * @return
     */
    public static String getTempDir() {
        String dir = System.getProperty("torgo.temp");
        if (dir == null) {
            dir = System.getProperty("java.io.tmpdir");
        }
        return dir;
    }
}

Related

  1. getTempDir()
  2. getTempDir()
  3. getTempDir()
  4. getTempDir()