class_docstr: Builder that outputs epub files.
  
  It creates the metainfo files container.opf, toc.ncx, mimetype, and
  META-INF/container.xml.  Afterwards, all necessary files are zipped to an
  epub file.
class_docstr_tok: ["Builder","that","outputs","epub","files",".","It","creates","the","metainfo","files","container.opf",",","toc.ncx",",","mimetype",",","and","META-INF\/container.xml",".","Afterwards",",","all","necessary","files","are","zipped","to","an","epub","file","."]
docstr: Add the root_doc, pre and post files to a list of refnodes.
          
code: def toc_add_files(self, refnodes: list[dict[str, Any]]) -> None:
      """Add the root_doc, pre and post files to a list of refnodes."""
      refnodes.insert(
          0,
          {
              "level": 1,
              "refuri": html.escape(
                  self.config.root_doc + self.out_suffix
              ),
              "text": ssp(
                  html.escape(
                      self.env.titles[self.config.root_doc].astext()
                  )
              ),
          },
      )
      for file, text in reversed(self.config.epub_pre_files):
          refnodes.insert(
              0,
              {
                  "level": 1,
                  "refuri": html.escape(file),
                  "text": ssp(html.escape(text)),
              },
          )
      for file, text in self.config.epub_post_files:
          refnodes.append(
              {
                  "level": 1,
                  "refuri": html.escape(file),
                  "text": ssp(html.escape(text)),
              }
          )
  
imports: from __future__ import annotations
  import html
  import os
  import re
  import time
  from os import path
  from typing import TYPE_CHECKING, Any, NamedTuple
  from urllib.parse import quote
  from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
  from docutils import nodes
  from docutils.utils import smartquotes
  from sphinx import addnodes
  from sphinx.builders.html import BuildInfo, StandaloneHTMLBuilder
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.display import status_iterator
  from sphinx.util.fileutil import copy_asset_file
  from sphinx.util.osutil import copyfile, ensuredir, relpath
label_desc: Use image node_id 8 for calling the EpubBuilder obj's underlying member method code with example usage: obj.toc_add_files(refnodes) without return types