docs: private static void removeDirectory(File directory) throws IOException
    {
      // File.listFiles() may return null is file is not a directory - condition already tested before entering this
      // method
      for(File file : directory.listFiles()) {
        if(file.isDirectory()) {
          removeDirectory(file);
        }
        log.trace("Delete %s |%s|.", file.isDirectory() ? "empty directory" : "file", file);
        if(!file.delete()) {
          throw new IOException(String.format("Fail to delete %s |%s|.", file.isDirectory() ? "empty directory" : "file", file));
        }
      }
    }