class_docstr: Documentation builder for Airflow.
docstr: Cleanup all artifacts generated by previous builds.
docstr_tok: ["Cleanup","all","artifacts","generated","by","previous","builds","."]
code: def clean_files(self) -> None:
      """Cleanup all artifacts generated by previous builds."""
      api_dir = os.path.join(self._src_dir, "_api")
  
      shutil.rmtree(api_dir, ignore_errors=True)
      shutil.rmtree(self._build_dir, ignore_errors=True)
      os.makedirs(api_dir, exist_ok=True)
      os.makedirs(self._build_dir, exist_ok=True)
  
imports: from __future__ import annotations
  import os
  import re
  import shlex
  import shutil
  from glob import glob
  from subprocess import run
  from rich.console import Console
  from .code_utils import ALL_PROVIDER_YAMLS, ALL_PROVIDER_YAMLS_WITH_SUSPENDED, CONSOLE_WIDTH, DOCS_DIR, PROCESS_TIMEOUT
  from .errors import DocBuildError, parse_sphinx_warnings
  from .helm_chart_utils import chart_version
  from .spelling_checks import SpellingError, parse_spelling_warnings
label_desc: Use image node_id 12 for calling the AirflowDocsBuilder obj's underlying member method code with example usage: obj.clean_files() without return types