com.atlassian.jira.util
Class TempDirectoryUtil

java.lang.Object
  extended by com.atlassian.jira.util.TempDirectoryUtil

public class TempDirectoryUtil
extends java.lang.Object

This util class was added to be able to create a "temporary" directory.

Since:
v3.13

Constructor Summary
TempDirectoryUtil()
           
 
Method Summary
static java.io.File createTempDirectory(java.lang.String prefix)
          Creates an empty directory in the default temporary-file directory, using the given prefix and suffix to generate its name.
static java.lang.String getSystemTempDir()
          Returns the system's temp directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempDirectoryUtil

public TempDirectoryUtil()
Method Detail

createTempDirectory

public static java.io.File createTempDirectory(java.lang.String prefix)
Creates an empty directory in the default temporary-file directory, using the given prefix and suffix to generate its name.

Note: these directories will get deleted when the JVM exits.

Parameters:
prefix - The prefix string to be used in generating the directory's name.
Returns:
A File object denoting a newly-created empty directory

getSystemTempDir

public static java.lang.String getSystemTempDir()
Returns the system's temp directory.

Be aware that some operating systems place a trailing slash and others don't.

Returns:
the system's temp directory.


Copyright © 2002-2010 Atlassian. All Rights Reserved.