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

Function file_ignored

src/ls.c:3144–3153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3142/* Return true if FILE should be ignored. */
3143
3144static bool
3145file_ignored (char const *name)
3146{
3147 return ((ignore_mode != IGNORE_MINIMAL
3148 && name[0] == '.'
3149 && (ignore_mode == IGNORE_DEFAULT || ! name[1 + (name[1] == '.')]))
3150 || (ignore_mode == IGNORE_DEFAULT
3151 && patterns_match (hide_patterns, name))
3152 || patterns_match (ignore_patterns, name));
3153}
3154
3155/* POSIX requires that a file size be printed without a sign, even
3156 when negative. Assume the typical case where negative sizes are

Callers 1

print_dirFunction · 0.85

Calls 1

patterns_matchFunction · 0.85

Tested by

no test coverage detected