docs: public static void deleteDirOnExit(final File dir) {
          if (dir.isDirectory()) {
              final String[] children = dir.list();
              for (int i = 0; i < children.length; i++) {
                  deleteDirOnExit(new File(dir, children[i]));
              }
          }
  
          // The directory is now empty so delete it
          dir.deleteOnExit();
      }