MCPcopy Create free account
hub / github.com/coreutils/coreutils / patterns_match

Function patterns_match

src/ls.c:3133–3140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3131/* Return true if one of the PATTERNS matches FILE. */
3132
3133static bool
3134patterns_match (struct ignore_pattern const *patterns, char const *file)
3135{
3136 for (struct ignore_pattern const *p = patterns; p; p = p->next)
3137 if (fnmatch (p->pattern, file, FNM_PERIOD) == 0)
3138 return true;
3139 return false;
3140}
3141
3142/* Return true if FILE should be ignored. */
3143

Callers 1

file_ignoredFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected