in ees_network_drive/indexing_rule.py [0:0]
def should_index(self, file_details):
"""This method is used to check if the current file is following the indexing rule or not
:param file_details: dictionary containing file properties
:param include: include pattern provided for matching
:param exclude: exclude pattern for matching
:returns: True or False denoting if the file is to following the indexing rule or not
"""
should_include, should_exclude = True, True
if self.include:
should_include = self.should_include_or_exclude(self.include, {}, file_details, 'include')
if self.exclude:
should_exclude = self.should_include_or_exclude(self.exclude, self.include, file_details, 'exclude')
return should_include and should_exclude