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

def IncludesStatic(self, path):

    path = self._UrlifyPath(path)
    if (not self.static_include_pattern):
        includes_list = ([inc.pattern for inc in self.static_file_includes] or [(self.public_root + '/**')])
        self.static_include_pattern = self._CreatePatternListRegex(includes_list)
    if self.static_file_excludes:
        if (not self.static_exclude_pattern):
            self.static_exclude_pattern = self._CreatePatternListRegex(self.static_file_excludes)
        if self.static_exclude_pattern.match(path):
            return False
    return self.static_include_pattern.match(path)
