def match(self, filepath):
        """
        The function to check file.
        Should return True if match, False otherwise.
        """
        for pattern in self.__pattern:
            if len(fnmatch.filter([filepath], pattern)) > 0:
                return True
        return False
def match ( self , filepath ) : for pattern in self . __pattern : if len ( fnmatch . filter ( [ filepath ] , pattern ) ) > 0 : return True return False
The function to check file.
        Should return True if match, False otherwise.