class_docstr: Load templates from a directory in the file system.
  
  The path can be relative or absolute. Relative paths are relative to
  the current working directory.
  
  .. code-block:: python
  
      loader = FileSystemLoader("templates")
  
  A list of paths can be given. The directories will be searched in
  order, stopping at the first matching template.
  
  .. code-block:: python
  
      loader = FileSystemLoader(["/override/templates", "/default/templates"])
  
  :param searchpath: A path, or list of paths, to the directory that
      contains the templates.
  :param encoding: Use this encoding to read the text from template
      files.
  :param followlinks: Follow symbolic links in the path.
  
  .. versionchanged:: 2.8
      Added the ``followlinks`` parameter.
class_docstr_tok: ["Load","templates","from","a","directory","in","the","file","system",".","The","path","can","be","relative","or","absolute",".","Relative","paths","are","relative","to","the","current","working","directory",".","..","code-block",":",":","python","loader","=","FileSystemLoader","(","``","templates","''",")","A","list","of","paths","can","be","given",".","The","directories","will","be","searched","in","order",",","stopping","at","the","first","matching","template",".","..","code-block",":",":","python","loader","=","FileSystemLoader","(","[","``","\/override\/templates","''",",","``","\/default\/templates","''","]",")",":","param","searchpath",":","A","path",",","or","list","of","paths",",","to","the","directory","that","contains","the","templates",".",":","param","encoding",":","Use","this","encoding","to","read","the","text","from","template","files",".",":","param","followlinks",":","Follow","symbolic","links","in","the","path",".","..","versionchanged",":",":","2.8","Added","the","``","followlinks","``","parameter","."]
code: def list_templates(self) -> t.List[str]:
      found = set()
      for searchpath in self.searchpath:
          walk_dir = os.walk(searchpath, followlinks=self.followlinks)
          for dirpath, _, filenames in walk_dir:
              for filename in filenames:
                  template = (
                      os.path.join(dirpath, filename)[len(searchpath) :]
                      .strip(os.path.sep)
                      .replace(os.path.sep, "/")
                  )
                  if template[:2] == "./":
                      template = template[2:]
                  if template not in found:
                      found.add(template)
      return sorted(found)
  
imports: import importlib.util
  import os
  import posixpath
  import sys
  import pkgutil
  import typing
  import weakref
  import zipimport
  from collections import abc
  from hashlib import sha1
  from importlib import import_module
  from types import ModuleType
  from .exceptions import TemplateNotFound
  from .utils import internalcode
  from .utils import open_if_exists
  import __res
label_desc: Use image node_id 3 for calling the FileSystemLoader obj's underlying member method code with example usage: obj.list_templates() and returns: sorted