Github user ajs6f commented on a diff in the pull request: https://github.com/apache/jena/pull/458#discussion_r209314854 --- Diff: jena-base/src/main/java/org/apache/jena/atlas/io/IO.java --- @@ -364,4 +369,31 @@ public static String uniqueFilename(String directory, String base, String ext) { return null ; } } + + /** Delete everything from a {@code Path} start point, including the path itself. + * This function works on files or directories. + * This function does not follow symbolic links. + */ + public static void deleteAll(Path start) { + // Walks down the tree and deletes directories on the way backup. + try { + Files.walkFileTree(start, new SimpleFileVisitor<Path>() { --- End diff -- I'm not worried about it. I'm always a bit suspicious on anon inner classes because of the occasional GC problems, but I think I'm letting my suspicions run away from me.
---