@Override
                    public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException
                    {
                        try {
                            Files.deleteIfExists(dir);
                        } catch (IOException e) {
                            Log.debug("Plugin removal: could not delete: {}", dir);
                            throw e;
                        }
                        return FileVisitResult.CONTINUE;
                    }
Deletes a directory.

@param dir the directory to delete.
@return true if the directory was deleted.
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginManager.java