Class TempDirectory.CloseablePath

java.lang.Object
org.junit.jupiter.engine.extension.TempDirectory.CloseablePath
All Implemented Interfaces:
org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
Enclosing class:
TempDirectory

private static class TempDirectory.CloseablePath extends Object implements org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
  • Field Details

    • dir

      private final Path dir
  • Constructor Details

    • CloseablePath

      CloseablePath(Path dir)
  • Method Details

    • get

      Path get()
    • close

      public void close() throws IOException
      Specified by:
      close in interface org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
      Throws:
      IOException
    • deleteAllFilesAndDirectories

      private SortedMap<Path,IOException> deleteAllFilesAndDirectories() throws IOException
      Throws:
      IOException
    • resetPermissions

      private static void resetPermissions(Path path)
    • createIOExceptionWithAttachedFailures

      private IOException createIOExceptionWithAttachedFailures(SortedMap<Path,IOException> failures)
    • tryToDeleteOnExit

      private Path tryToDeleteOnExit(Path path)
    • relativizeSafely

      private Path relativizeSafely(Path path)