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
Fields -
Constructor Summary
Constructors -
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, waitMethods 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:TempDirFactoryCreate a new temporary directory.Depending on the implementation, the resulting
Pathmay or may not be associated with thedefault FileSystem.- Specified by:
createTempDirectoryin interfaceTempDirFactory- Parameters:
elementContext- the context of the field or parameter where@TempDiris declared; nevernullextensionContext- the current extension context; nevernull- Returns:
- the path to the newly created temporary directory; never
null - Throws:
IOException
-