'Checks whether a given file should be classified as a resource file.'

def IncludesResource(self, path):

    path = self._UrlifyPath(path)
    if (not self.resource_include_pattern):
        includes = (self.resource_file_includes or ['**'])
        self.resource_include_pattern = self._CreatePatternListRegex(includes)
    if self.resource_file_excludes:
        if (not self.resource_exclude_pattern):
            self.resource_exclude_pattern = self._CreatePatternListRegex(self.resource_file_excludes)
        if self.resource_exclude_pattern.match(path):
            return False
    return self.resource_include_pattern.match(path)
