Match filenames against the provided parameterized string.
559096
public File inFileNamed(String filenamePattern)
    {
        if (filenamePattern != null && !filenamePattern.isEmpty())
        {
            f.setFilenamePattern(new RegexParameterizedPatternParser(filenamePattern));
        }
        return f;
    }
748438
def file_matches_regexps(filename, patterns):
    """"""
    return any(re.match(pat, filename) for pat in patterns)
881401
def matchingfiles(self, projectpath):
        """"""
        l = []
        for inputtemplate in self.input:
            l += inputtemplate.matchingfiles(projectpath)
        return l
376832
def match(self, filepath):
        
        # no extension?
        if filepath.find(".") == -1:
            return False

        # match extension
        return filepath.lower().split(".")[-1] in self.__extensions
535525
public boolean match(String vfsName) {

        boolean match = false;

        for (int j = 0; j < m_vfsFolders.size(); j++) {
            Pattern pattern = m_vfsFolders.get(j);
            match = pattern.matcher(vfsName).matches();
            if (match) {
                break;
            }
        }
        return match;
    }
948575
def match(self, filename):
        
            
        double_neg = self._ignores[2].match(filename)
        if double_neg:
            return "!!%s" % double_neg
        elif self._ignores[1].match(filename):
            #print("Ignores")
            return None
        else:
            #print("Normal match")
            return self._ignores[0].match(filename)
31202
function extensionMatches (filename) {
		var extname = path.extname(filename);
		if (extname) {
			return extname === extension;
		}
		return true;
	}
939399
private synchronized void checkFileName(String fileName) throws ParameterException{
		Validate.notNull(fileName);
		File cFile = new File(fileName);
		if(cFile.getName().length()==0)
			throw new ParameterException(ErrorCode.INCOMPATIBILITY, fileName + " is not a valid file-name!");
	}
1189041
def _search(mapping, filename):
    """"""
    result = mapping.get(filename)
    if result is not None:
        return result
    name, ext = os.path.splitext(filename)
    result = mapping.get(ext)
    if result is not None:
        for pattern, result2 in result:
            if fnmatch(filename, pattern):
                return result2
    return None
440887
@Override
    public boolean matches(Source src) {
        String name = src.getOrigin().getName().toLowerCase();
        String[] extensions = getInputFileExtensions();
        if (extensions.length == 1) {
            return FilenameUtils.isExtension(name, extensions[0]);
        }

        return FilenameUtils.isExtension(name, extensions);
    }
1374634
def matches?(filename, candidates)
      filename = filename.downcase
      candidates = candidates.compact.map(&:name)
      @exts_and_langs.any? { |ext| filename.end_with?(ext) }
    end
1340948
def match_path(entry, opts):
    """"""
    if entry.name in ALWAYS_OMIT:
        return False
    # TODO: currently we use fnmatch syntax and match against names.
    # We also might allow glob syntax and match against the whole relative path instead
    # path = entry.get_rel_path()
    path = entry.name
    ok = True
    match = opts.get("match")
    exclude = opts.get("exclude")
    if entry.is_file() and match:
        assert type(match) is list
        ok = False
        for pat in match:
            if fnmatch.fnmatch(path, pat):
                ok = True
                break
    if ok and exclude:
        assert type(exclude) is list
        for pat in exclude:
            if fnmatch.fnmatch(path, pat):
                ok = False
                break
    # write("match", ok, entry)
    return ok
498319
def match(self, string):
        """"""
        if self.casesensitive:
            return fnmatch.fnmatch(string, self.pattern)
        else:
            return fnmatch.fnmatch(string.lower(), self.pattern.lower())
1337787
def normalize_filename(string):
    
    if not isinstance(string, basestring):
        fail("Type of argument must be string, found '{}'"
             .format(type(string)))
    # get the file nomalizer utility
    normalizer = getUtility(IFileNameNormalizer).normalize
    return normalizer(string)
1290636
def match_files(self, matched, unmatched):
        """"""
        this_match = set(self.file_filter(unmatched))
        matched |= this_match
        unmatched -= this_match
297945
def _match_filters(parameter, filters=None):
        """"""
        for filter_obj in (filters or []):
            key = filter_obj['Key']
            option = filter_obj.get('Option', 'Equals')
            values = filter_obj.get('Values', [])

            what = None
            if key == 'Type':
                what = parameter.type
            elif key == 'KeyId':
                what = parameter.keyid

            if option == 'Equals'\
                    and not any(what == value for value in values):
                return False
            elif option == 'BeginsWith'\
                    and not any(what.startswith(value) for value in values):
                return False
        # True if no false match (or no filters at all)
        return True
1328945
def match(cls, pattern, inverse=False):
        """"""
        string_pattern = pattern
        invert_search = inverse

        class DefinedStringFilter(cls):
            pattern = string_pattern
            inverse = invert_search
        return DefinedStringFilter