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 final TempDirFactory
private static final Logger
-
Constructor Summary
ConstructorsConstructorDescriptionCloseablePath
(TempDirFactory factory, CleanupMode cleanupMode, AnnotatedElementContext elementContext, ExtensionContext extensionContext) -
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 Path
tryToDeleteOnExit
(Path path) private static void
tryToResetPermissions
(Path path)
-
Field Details
-
logger
-
dir
-
factory
-
cleanupMode
-
extensionContext
-
-
Constructor Details
-
CloseablePath
CloseablePath(TempDirFactory factory, CleanupMode cleanupMode, AnnotatedElementContext elementContext, ExtensionContext extensionContext) throws Exception - Throws:
Exception
-
-
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
-
tryToResetPermissions
-
createIOExceptionWithAttachedFailures
-
tryToDeleteOnExit
-
relativizeSafely
-