Github user ajs6f commented on a diff in the pull request: https://github.com/apache/jena/pull/458#discussion_r209307965 --- 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 -- Could this `new SimpleFileVisitor` be broken out as a `static` inner class?
---