class_docstr: The :class:`PathSpec` class is a wrapper around a list of compiled
  :class:`.Pattern` instances.
class_docstr_tok: ["The",":","class",":","`","PathSpec","`","class","is","a","wrapper","around","a","list","of","compiled",":","class",":","`",".Pattern","`","instances","."]
docstr: Walks the specified root path for all files and matches them to this
  path-spec.
  
  *root* (:class:`str` or :class:`os.PathLike`) is the root directory to
  search for files.
  
  *on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
  is the error handler for file-system exceptions. It will be called with the
  exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
  is :data:`None` to ignore file-system exceptions.
  
  *follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
  symbolic links that resolve to directories. Default is :data:`None` for
  :data:`True`.
  
  *negate* (:class:`bool` or :data:`None`) is whether to negate the match
  results of the patterns. If :data:`True`, a pattern matching a file will
  exclude the file rather than include it. Default is :data:`None` for
  :data:`False`.
  
  Returns the matched files (:class:`~collections.abc.Iterable` of
  :class:`str`).
docstr_tok: ["Walks","the","specified","root","path","for","all","files","and","matches","them","to","this","path-spec",".","*","root","*","(",":","class",":","`","str","`","or",":","class",":","`","os.PathLike","`",")","is","the","root","directory","to","search","for","files",".","*","on_error","*","(",":","class",":","`","~collections.abc.Callable","`","or",":","data",":","`","None","`",")","optionally","is","the","error","handler","for","file-system","exceptions",".","It","will","be","called","with","the","exception","(",":","exc",":","`","OSError","`",")",".","Reraise","the","exception","to","abort","the","walk",".","Default","is",":","data",":","`","None","`","to","ignore","file-system","exceptions",".","*","follow_links","*","(",":","class",":","`","bool","`","or",":","data",":","`","None","`",")","optionally","is","whether","to","walk","symbolic","links","that","resolve","to","directories",".","Default","is",":","data",":","`","None","`","for",":","data",":","`","True","`",".","*","negate","*","(",":","class",":","`","bool","`","or",":","data",":","`","None","`",")","is","whether","to","negate","the","match","results","of","the","patterns",".","If",":","data",":","`","True","`",",","a","pattern","matching","a","file","will","exclude","the","file","rather","than","include","it",".","Default","is",":","data",":","`","None","`","for",":","data",":","`","False","`",".","Returns","the","matched","files","(",":","class",":","`","~collections.abc.Iterable","`","of",":","class",":","`","str","`",")","."]
code: def match_tree_files(
      self,
      root: StrPath,
      on_error: Optional[Callable[[OSError], None]] = None,
      follow_links: Optional[bool] = None,
      *,
      negate: Optional[bool] = None,
  ) -> Iterator[str]:
      """
      Walks the specified root path for all files and matches them to this
      path-spec.
  
      *root* (:class:`str` or :class:`os.PathLike`) is the root directory to
      search for files.
  
      *on_error* (:class:`~collections.abc.Callable` or :data:`None`) optionally
      is the error handler for file-system exceptions. It will be called with the
      exception (:exc:`OSError`). Reraise the exception to abort the walk. Default
      is :data:`None` to ignore file-system exceptions.
  
      *follow_links* (:class:`bool` or :data:`None`) optionally is whether to walk
      symbolic links that resolve to directories. Default is :data:`None` for
      :data:`True`.
  
      *negate* (:class:`bool` or :data:`None`) is whether to negate the match
      results of the patterns. If :data:`True`, a pattern matching a file will
      exclude the file rather than include it. Default is :data:`None` for
      :data:`False`.
  
      Returns the matched files (:class:`~collections.abc.Iterable` of
      :class:`str`).
      """
      files = util.iter_tree_files(
          root, on_error=on_error, follow_links=follow_links
      )
      yield from self.match_files(files, negate=negate)
  
imports: from collections.abc import Collection
  from itertools import zip_longest
  from typing import AnyStr, Callable, Collection, Iterable, Iterator, Optional, Type, TypeVar, Union
  from .None import util
  from .pattern import Pattern
  from .util import CheckResult, StrPath, TStrPath, TreeEntry, _filter_check_patterns, _is_iterable, normalize_file
label_desc: Use image node_id 14 for calling the PathSpec obj's underlying member method code with example usage: obj.match_tree_files(root, on_error, follow_links) without return types