@Override
                            public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) {
                                // If the dir is empty and old then record it.
                                final Instant age = dirAges.remove(dir);
                                if (age != null && age.isBefore(oldestDirTime)) {
                                    LOGGER.trace(() -> "Orphan dir: " + FileUtil.getCanonicalPath(dir));
                                    orphanConsumer.accept(dir);
                                } else {
                                    LOGGER.trace("Ignoring recently created dir {}", dir);
                                }

                                return super.postVisitDirectory(dir, exc);
                            }
API used by the tasks to interface to the stream store under the bonnet.
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/FsOrphanFileFinder.java