code: public void deleteTempDir(File file) {
      if (!shouldReap()) {
        return;
      }
  
      // If the tempfile can be removed, delete it. If not, it wasn't created by us.
      if (temporaryFiles.remove(file)) {
        FileHandler.delete(file);
      }
    }
docs: Delete a temporary directory that we were responsible for creating.
  
  @param file the file to delete
  @throws WebDriverException if interrupted