Java Temp Directory Get getTempDir()

Here you can find the source of getTempDir()

Description

get Temp Dir

License

Open Source License

Declaration

private static File getTempDir() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2005, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are 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://from  w  w  w.  java2s .com
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

import java.io.File;

public class Main {
    private static final String BUFFER_DIR = "./webCache";

    private static File getTempDir() {
        File tempDir = new File(BUFFER_DIR);
        if (tempDir.exists())
            return tempDir;
        tempDir.mkdir();
        return tempDir;
    }
}

Related

  1. getTempDir()
  2. getTempDir()
  3. getTempDir()
  4. getTempDir()
  5. getTempDir()
  6. getTempDir(File baseDir)
  7. getTempDir(final String directory, final String prefix, boolean autodelete)
  8. getTempDir(Object fileID, String fileName)
  9. getTempDir(String desc)