Class TempDirectory.CloseablePath
java.lang.Object
org.junit.jupiter.engine.extension.TempDirectory.CloseablePath
- All Implemented Interfaces:
ExtensionContext.Store.CloseableResource
- Enclosing class:
- TempDirectory
static class TempDirectory.CloseablePath
extends Object
implements ExtensionContext.Store.CloseableResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CleanupMode
private final Path
private final ExtensionContext
private static final Logger
-
Constructor Summary
ConstructorsConstructorDescriptionCloseablePath
(Path dir, CleanupMode cleanupMode, ExtensionContext executionContext) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close underlying resources.private IOException
private SortedMap<Path,
IOException> deleteAllFilesAndDirectories
(TempDirectory.FileOperations fileOperations) (package private) Path
get()
private Path
relativizeSafely
(Path path) private static void
resetPermissions
(Path path) private Path
tryToDeleteOnExit
(Path path)
-
Field Details
-
logger
-
dir
-
cleanupMode
-
executionContext
-
-
Constructor Details
-
CloseablePath
CloseablePath(Path dir, CleanupMode cleanupMode, ExtensionContext executionContext)
-
-
Method Details
-
get
Path get() -
close
Description copied from interface:ExtensionContext.Store.CloseableResource
Close underlying resources.- Specified by:
close
in interfaceExtensionContext.Store.CloseableResource
- Throws:
IOException
-
deleteAllFilesAndDirectories
private SortedMap<Path,IOException> deleteAllFilesAndDirectories(TempDirectory.FileOperations fileOperations) throws IOException - Throws:
IOException
-
resetPermissions
-
createIOExceptionWithAttachedFailures
-
tryToDeleteOnExit
-
relativizeSafely
-