Class TempDirectory.CloseablePath
- java.lang.Object
-
- org.junit.jupiter.engine.extension.TempDirectory.CloseablePath
-
- All Implemented Interfaces:
ExtensionContext.Store.CloseableResource
- Enclosing class:
- TempDirectory
private static class TempDirectory.CloseablePath extends java.lang.Object implements ExtensionContext.Store.CloseableResource
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.Path
dir
-
Constructor Summary
Constructors Constructor Description CloseablePath(java.nio.file.Path dir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close underlying resources.private java.io.IOException
createIOExceptionWithAttachedFailures(java.util.SortedMap<java.nio.file.Path,java.io.IOException> failures)
private java.util.SortedMap<java.nio.file.Path,java.io.IOException>
deleteAllFilesAndDirectories()
(package private) java.nio.file.Path
get()
private java.nio.file.Path
relativizeSafely(java.nio.file.Path path)
private static void
resetPermissions(java.nio.file.Path path)
private java.nio.file.Path
tryToDeleteOnExit(java.nio.file.Path path)
-
-
-
Method Detail
-
get
java.nio.file.Path get()
-
close
public void close() throws java.io.IOException
Description copied from interface:ExtensionContext.Store.CloseableResource
Close underlying resources.- Specified by:
close
in interfaceExtensionContext.Store.CloseableResource
- Throws:
java.io.IOException
-
deleteAllFilesAndDirectories
private java.util.SortedMap<java.nio.file.Path,java.io.IOException> deleteAllFilesAndDirectories() throws java.io.IOException
- Throws:
java.io.IOException
-
resetPermissions
private static void resetPermissions(java.nio.file.Path path)
-
createIOExceptionWithAttachedFailures
private java.io.IOException createIOExceptionWithAttachedFailures(java.util.SortedMap<java.nio.file.Path,java.io.IOException> failures)
-
tryToDeleteOnExit
private java.nio.file.Path tryToDeleteOnExit(java.nio.file.Path path)
-
relativizeSafely
private java.nio.file.Path relativizeSafely(java.nio.file.Path path)
-
-