docs: public static boolean deleteDir(final File self) {
          if (!self.exists())
              return true;
          if (!self.isDirectory())
              return false;
  
          File[] files = self.listFiles();
          if (files == null)
              // couldn't access files
              return false;
  
          // delete contained files
          boolean result = true;
          for (File file : files) {
              if (file.isDirectory()) {
                  if (!deleteDir(file))
                      result = false;
              } else {
                  if (!file.delete())
                      result = false;
              }
          }
  
          // now delete directory itself
          if (!self.delete())
              result = false;
  
          return result;
      }