public class

TempDirectoryUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.TempDirectoryUtil

Class Overview

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

Summary

Public Constructors
TempDirectoryUtil()
Public Methods
static File createTempDirectory(String prefix)
Creates an empty directory in the default temporary-file directory, using the given prefix and suffix to generate its name.
static String getSystemTempDir()
Returns the system's temp directory.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public TempDirectoryUtil ()

Public Methods

public static File createTempDirectory (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

public static 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.