Java Temp Directory Get getTempDirectory()

Here you can find the source of getTempDirectory()

Description

get Temp Directory

License

Apache License

Declaration

public static File getTempDirectory() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.File;

public class Main {
    static boolean tempCreated = false;

    public static File getTempDirectory() {
        final File tempDirectory = new File(
                System.getProperty("java.io.tmpdir"),
                "gluster-test-mount-point");

        //initialize?
        if (!tempCreated) {
            tempDirectory.mkdirs();/*from   w w  w . ja v a  2s .  c om*/
            tempDirectory.delete();
            tempDirectory.mkdir();
        }
        tempCreated = true;
        return tempDirectory;
    }
}

Related

  1. getTempDir(String path)
  2. getTempDir(String prefix)
  3. getTempDir(String suffix)
  4. getTempDirectory()
  5. getTempDirectory()
  6. getTempDirectory()
  7. getTempDirectory()
  8. getTempDirectory()
  9. getTempDirectory()