Package org.junit.jupiter.api.io
Class TempDirFactory.Standard
- java.lang.Object
-
- org.junit.jupiter.api.io.TempDirFactory.Standard
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,TempDirFactory
- Enclosing interface:
- TempDirFactory
public static class TempDirFactory.Standard extends java.lang.Object implements TempDirFactory
StandardTempDirFactoryimplementation which delegates toFiles.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:
Files.createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute[])
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.jupiter.api.io.TempDirFactory
TempDirFactory.Standard
-
-
Field Summary
Fields Modifier and Type Field Description static TempDirFactoryINSTANCE
-
Constructor Summary
Constructors Constructor Description Standard()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathcreateTempDirectory(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 Detail
-
INSTANCE
public static final TempDirFactory INSTANCE
-
-
Method Detail
-
createTempDirectory
public java.nio.file.Path createTempDirectory(AnnotatedElementContext elementContext, ExtensionContext extensionContext) throws java.io.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:
java.io.IOException
-
-