Class TempDirDeletionStrategy.IgnoreFailures
java.lang.Object
org.junit.jupiter.api.io.TempDirDeletionStrategy.IgnoreFailures
- All Implemented Interfaces:
TempDirDeletionStrategy
- Enclosing interface:
TempDirDeletionStrategy
public static final class TempDirDeletionStrategy.IgnoreFailures
extends Object
implements TempDirDeletionStrategy
A
TempDirDeletionStrategy that delegates to TempDirDeletionStrategy.Standard but
suppresses deletion failures by logging a warning instead of propagating
them.- Since:
- 6.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface TempDirDeletionStrategy
TempDirDeletionStrategy.DeletionException, TempDirDeletionStrategy.DeletionFailure, TempDirDeletionStrategy.DeletionResult, TempDirDeletionStrategy.IgnoreFailures, TempDirDeletionStrategy.Standard -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newIgnoreFailuresstrategy that delegates toTempDirDeletionStrategy.Standard. -
Method Summary
Modifier and TypeMethodDescriptiondelete(Path tempDir, AnnotatedElementContext elementContext, ExtensionContext extensionContext) Delete the supplied temporary directory and all of its contents.static StringdescriptionFor(AnnotatedElement annotatedElement)
-
Constructor Details
-
IgnoreFailures
public IgnoreFailures()Create a newIgnoreFailuresstrategy that delegates toTempDirDeletionStrategy.Standard.
-
-
Method Details
-
delete
public TempDirDeletionStrategy.DeletionResult delete(Path tempDir, AnnotatedElementContext elementContext, ExtensionContext extensionContext) throws IOException Description copied from interface:TempDirDeletionStrategyDelete the supplied temporary directory and all of its contents.Depending on the used
TempDirFactory, the suppliedPathmay or may not be associated with the default FileSystem.- Specified by:
deletein interfaceTempDirDeletionStrategy- Parameters:
tempDir- the temporary directory to delete; nevernullelementContext- the context of the field or parameter where@TempDiris declared; nevernullextensionContext- the current extension context; nevernull- Returns:
- a
TempDirDeletionStrategy.DeletionResult, potentially containing failures forPathsthat could not be deleted or no failures if deletion was successful; nevernull - Throws:
IOException- in case of general failures
-
descriptionFor
-