Package org.verifyica.api
Class TemporaryDirectory
java.lang.Object
org.verifyica.api.TemporaryDirectory
- All Implemented Interfaces:
AutoCloseable
Class to implement TemporaryDirectory
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum to implement CleanupMode -
Constructor Summary
ConstructorsConstructorDescriptionConstructorTemporaryDirectory(String prefix) ConstructorTemporaryDirectory(String prefix, TemporaryDirectory.CleanupMode cleanupMode) ConstructorTemporaryDirectory(TemporaryDirectory.CleanupMode cleanupMode) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddelete()Method to delete the temporary directorybooleanfile()Get the temporary directory FileinthashCode()newFile()Method to create a new file in the temporary directoryMethod to create a new file in the temporary directorypath()Get the temporary directory PathtoFile()Get the temporary directory FiletoPath()Get the temporary directory PathtoString()
-
Constructor Details
-
TemporaryDirectory
Constructor- Throws:
IOException- IOException if the temporary directory can't be created
-
TemporaryDirectory
Constructor- Parameters:
cleanupMode- cleanupMode- Throws:
IOException- IOException if the temporary directory can't be created
-
TemporaryDirectory
Constructor- Parameters:
prefix- prefix- Throws:
IOException- IOException if the temporary directory can't be created
-
TemporaryDirectory
public TemporaryDirectory(String prefix, TemporaryDirectory.CleanupMode cleanupMode) throws IOException Constructor- Parameters:
prefix- prefixcleanupMode- cleanupMode- Throws:
IOException- IOException if the temporary directory can't be created
-
-
Method Details
-
file
Get the temporary directory File- Returns:
- the temporary directory File
-
toFile
Get the temporary directory File- Returns:
- the temporary directory File
-
path
Get the temporary directory Path- Returns:
- the temporary directory Path
-
toPath
Get the temporary directory Path- Returns:
- the temporary directory Path
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
delete
Method to delete the temporary directory- Throws:
IOException- IOException
-
newFile
Method to create a new file in the temporary directory- Returns:
- the new file
- Throws:
IOException- IOException
-
newFile
Method to create a new file in the temporary directory- Parameters:
name- name- Returns:
- the new file
- Throws:
IOException- IOException
-
toString
-
equals
-
hashCode
public int hashCode()
-