(self)
return matching_files
Find matching file with wildcard matching expression
Find matching file with wildcard matching expression
Find matching file with wildcard matching expression
def match(self):
        """Find matching file with wildcard matching expression"""
        directory = os.path.dirname(self.filename)
        matching_expression = os.path.basename(self.filename)
        matching_files = []
        if not os.path.isdir(directory):
            return []
        for f_name in os.listdir(directory):
            if re.match(matching_expression, f_name):
                matching_files.append(directory + "/" + f_name)
        return matching_files
def match ( self ) : directory = os . path . dirname ( self . filename ) matching_expression = os . path . basename ( self . filename ) matching_files = [ ] if not os . path . isdir ( directory ) : return [ ] for f_name in os . listdir ( directory ) : if re . match ( matching_expression , f_name ) : matching_files . append ( directory + "/" + f_name ) return matching_files