Files { public static Path tempDir() { String tempDir = System.getProperty("java.io.tmpdir"); Path path = Paths.get(tempDir + "/" + UUID.randomUUID().toString()); createDir(path); return path; }  static String text(Path file); static byte[] bytes(Path file); static void createDir(Path directory); static void deleteDir(Path directory); static Path tempFile(); static Path tempDir(); static void delete(Path file); static long size(Path file); static Instant lastModified(Path file);  }
@Test void tempDir() { Path tempDir = Files.tempDir(); assertThat(tempDir).exists().isDirectory(); Files.createDir(tempDir.resolve("temp")); Files.createDir(tempDir.resolve("temp")); Files.deleteDir(tempDir); }