code: def Matches(self, file_entry):
      
      if not self._file_scanner or not file_entry.IsFile():
        return None
  
      file_object = file_entry.GetFileObject()
      if not file_object:
        return False
  
      try:
        scan_state = pysigscan.scan_state()
        self._file_scanner.scan_file_object(scan_state, file_object)
  
      except IOError as exception:
        # TODO: replace location by display name.
        location = getattr(file_entry.path_spec, 'location', '')
        logging.error((
            '[skipping] unable to scan file: {0:s} for signatures '
            'with error: {1!s}').format(location, exception))
        return False
  
      finally:
        file_object.close()
  
      return scan_state.number_of_scan_results > 0
docs: Compares the file entry against the filter.
  
      Args:
        file_entry (dfvfs.FileEntry): file entry to compare.
  
      Returns:
        bool: True if the file entry matches the filter, False if not or
            None if the filter does not apply.