Java Temp Directory Get getTempDirURL()

Here you can find the source of getTempDirURL()

Description

Get the absolute url of a os specific temp directory

License

Open Source License

Return

absolute url of a temp directory

Declaration

public static String getTempDirURL() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*w  w  w.  java 2 s.c  om*/
     * Get the absolute url of a os specific temp directory 
     * @return absolute url of a temp directory
     */
    public static String getTempDirURL() {
        String tempdir = System.getProperty("java.io.tmpdir");

        if (!(tempdir.endsWith("/") || tempdir.endsWith("\\"))) {
            tempdir = tempdir + System.getProperty("file.separator");
        }
        return tempdir;
    }
}

Related

  1. getTempDirectoryPathString()
  2. getTempDirectoryStr()
  3. getTempDirFile()
  4. getTempDirFilePath(String name)
  5. getTempDirName()
  6. getTempDirValue()
  7. getTempDirWithFileSeparatorSuffix()