docs: public static void purgeDirectory(File directory) {
  
          if (directory.canRead() && directory.isDirectory()) {
              File[] files = directory.listFiles();
              for (int i = 0; i < files.length; i++) {
                  File f = files[i];
                  if (f.isDirectory()) {
                      purgeDirectory(f);
                  }
                  if (f.canWrite()) {
                      f.delete();
                  }
              }
              directory.delete();
          }
      }