java.lang.Object
org.junit.jupiter.api.io.TempDirFactory.Standard
- All Implemented Interfaces:
Closeable
,AutoCloseable
,TempDirFactory
- Enclosing interface:
TempDirFactory
Standard
TempDirFactory
implementation which delegates to
Files.createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute<?>...)
using "junit-,"
as prefix.
The created temporary directory is always created in the default file system with the system's default temporary directory as its parent.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.io.TempDirFactory
TempDirFactory.Standard
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTempDirectory
(AnnotatedElementContext elementContext, ExtensionContext extensionContext) Create a new temporary directory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.junit.jupiter.api.io.TempDirFactory
close
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Standard
public Standard()
-
-
Method Details
-
createTempDirectory
public Path createTempDirectory(AnnotatedElementContext elementContext, ExtensionContext extensionContext) throws IOException Description copied from interface:TempDirFactory
Create a new temporary directory.Depending on the implementation, the resulting
Path
may or may not be associated with thedefault FileSystem
.- Specified by:
createTempDirectory
in interfaceTempDirFactory
- Parameters:
elementContext
- the context of the field or parameter where@TempDir
is declared; nevernull
extensionContext
- the current extension context; nevernull
- Returns:
- the path to the newly created temporary directory; never
null
- Throws:
IOException
-