docs: def build_toc_tree(title, input, output, content_directory):
      """
      Builds Sphinx documentation table of content tree file.
  
      :param title: Package title.
      :type title: unicode
      :param input: Input file to convert.
      :type input: unicode
      :param output: Output file.
      :type output: unicode
      :param content_directory: Directory containing the content to be included in the table of content.
      :type content_directory: unicode
      :return: Definition success.
      :rtype: bool
      """
  
      LOGGER.info("{0} | Building Sphinx documentation index '{1}' file!".format(build_toc_tree.__name__,
                                                                                 output))
      file = File(input)
      file.cache()
  
      existing_files = [foundations.strings.get_splitext_basename(item)
                        for item in glob.glob("{0}/*{1}".format(content_directory, FILES_EXTENSION))]
      relative_directory = content_directory.replace("{0}/".format(os.path.dirname(output)), "")
  
      toc_tree = ["\n"]
      for line in file.content:
          search = re.search(r"`([a-zA-Z_ ]+)`_", line)
          if not search:
              continue
  
          item = search.groups()[0]
          code = "{0}{1}".format(item[0].lower(), item.replace(" ", "")[1:])
          if code in existing_files:
              link = "{0}/{1}".format(relative_directory, code)
              data = "{0}{1}{2} <{3}>\n".format(" ", " " * line.index("-"), item, link)
              LOGGER.info("{0} | Adding '{1}' entry to Toc Tree!".format(build_toc_tree.__name__,
                                                                         data.replace("\n", "")))
              toc_tree.append(data)
      toc_tree.append("\n")
  
      TOCTREE_TEMPLATE_BEGIN[0] = TOCTREE_TEMPLATE_BEGIN[0].format(title)
      TOCTREE_TEMPLATE_BEGIN[1] = TOCTREE_TEMPLATE_BEGIN[1].format("=" * len(TOCTREE_TEMPLATE_BEGIN[0]))
      content = TOCTREE_TEMPLATE_BEGIN
      content.extend(toc_tree)
      content.extend(TOCTREE_TEMPLATE_END)
  
      file = File(output)
      file.content = content
      file.write()
  
      return True