Java Temp File Create getTempFileDir()

Here you can find the source of getTempFileDir()

Description

Returns the Ofbiz temporary file directory (for uploaded files, etc).

License

Apache License

Return

a File object representing the temp file directory

Declaration

public static File getTempFileDir() 

Method Source Code


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

import java.io.File;

public class Main {
    /**//from   w  ww . j a va2 s . c o m
     * Returns the Ofbiz temporary file directory (for uploaded files, etc).
     * <p>
     * Always use this call instead of hardcoding the location, so it can be
     * changed easily in this central location in the future, if needed.
     *  
     * @return  a File object representing the temp file directory
     */
    public static File getTempFileDir() {
        return new File(new File(System.getProperty("ofbiz.home"), "runtime"), "tmp");
    }
}

Related

  1. getTempFile(String extension)
  2. getTempFile(String fileId)
  3. getTempFile(String filePrefix, boolean deleteOnExit)
  4. getTempFile(String name)
  5. getTempFile(String tmpdir)
  6. getTempFileFor(File file)
  7. getTempFileGivenName(File file)
  8. getTempFileName()
  9. getTempFileName()