Package com.atlassian.jira.util
Class TempDirectoryUtil
java.lang.Object
com.atlassian.jira.util.TempDirectoryUtil
This util class was added to be able to create a "temporary" directory.
- Since:
- v3.13
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Returns the system's temp directory.
-
Constructor Details
-
TempDirectoryUtil
public TempDirectoryUtil()
-
-
Method Details
-
createTempDirectory
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
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.
-