public class TempPath
extends java.lang.Object
| Constructor and Description |
|---|
TempPath()
Create a TempPath in a temporary Directory
|
TempPath(java.nio.file.Path root)
Create a TempPath in a defined directory
|
| Modifier and Type | Method and Description |
|---|---|
static void |
clearTemporaryFolder(java.nio.file.Path tmp)
Clear up all the content from below the given directory.
|
java.lang.String |
get()
Return the temporary root folder as string
|
java.nio.file.Path |
get(java.lang.String directory)
Return the path to the temporary directory with the extension name
|
java.io.File |
getTempFile(java.lang.String file)
Return a new file
|
java.io.File |
getTempFile(java.lang.String directory,
java.lang.String file)
Return a new file from the directory
|
java.lang.String |
getTempString(java.lang.String file)
Return a new temp file as string
|
java.lang.String |
getTempString(java.lang.String directory,
java.lang.String file)
Return a new file from the directory
|
public TempPath(java.nio.file.Path root)
root - the root path of the temporary directory. Should be used with the tasks temp dir.public TempPath()
throws java.io.IOException
java.io.IOException - in case of errors while creating the temporary directorypublic java.lang.String get()
public java.nio.file.Path get(java.lang.String directory)
throws java.io.IOException
directory - below the tmp rootjava.io.IOException - in case of fire.public java.io.File getTempFile(java.lang.String directory,
java.lang.String file)
throws java.io.IOException
directory - below the tmp rootfile - name of the filejava.io.IOException - in case of fire.public java.io.File getTempFile(java.lang.String file)
file - name of the filepublic java.lang.String getTempString(java.lang.String file)
file - name of the filepublic java.lang.String getTempString(java.lang.String directory,
java.lang.String file)
throws java.io.IOException
directory - below the tmp rootfile - name of the filejava.io.IOException - in case of fire.public static void clearTemporaryFolder(java.nio.file.Path tmp)
throws java.lang.Exception
tmp - the temporary filejava.lang.Exception - in case of fire.