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: Check the files against this path-spec.
  
  *file* (:class:`str` or :class:`os.PathLike`) is the file path to be
  matched against :attr:`self.patterns <PathSpec.patterns>`.
  
  *separators* (:class:`~collections.abc.Collection` of :class:`str`; or
  :data:`None`) optionally contains the path separators to normalize. See
  :func:`~pathspec.util.normalize_file` for more information.
  
  Returns the file check result (:class:`~pathspec.util.CheckResult`).
docstr_tok: ["Check","the","files","against","this","path-spec",".","*","file","*","(",":","class",":","`","str","`","or",":","class",":","`","os.PathLike","`",")","is","the","file","path","to","be","matched","against",":","attr",":","`","self.patterns","<","PathSpec.patterns",">","`",".","*","separators","*","(",":","class",":","`","~collections.abc.Collection","`","of",":","class",":","`","str","`",";","or",":","data",":","`","None","`",")","optionally","contains","the","path","separators","to","normalize",".","See",":","func",":","`","~pathspec.util.normalize_file","`","for","more","information",".","Returns","the","file","check","result","(",":","class",":","`","~pathspec.util.CheckResult","`",")","."]
code: def check_file(
      self,
      file: TStrPath,
      separators: Optional[Collection[str]] = None,
  ) -> CheckResult[TStrPath]:
      """
      Check the files against this path-spec.
  
      *file* (:class:`str` or :class:`os.PathLike`) is the file path to be
      matched against :attr:`self.patterns <PathSpec.patterns>`.
  
      *separators* (:class:`~collections.abc.Collection` of :class:`str`; or
      :data:`None`) optionally contains the path separators to normalize. See
      :func:`~pathspec.util.normalize_file` for more information.
  
      Returns the file check result (:class:`~pathspec.util.CheckResult`).
      """
      norm_file = normalize_file(file, separators)
      include, index = self._match_file(
          enumerate(self.patterns), norm_file
      )
      return CheckResult(file, include, index)
  
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 6 for calling the PathSpec obj's underlying member method code with example usage: obj.check_file(file, separators) and returns: CheckResult