shouldExclude method
Checks if a file or directory name should be excluded based on this filter.
Implementation
bool shouldExclude(String name, {bool isHidden = false}) {
if (this == ExclusionFilters.none) {
return false;
}
// Check dot-prefixed filter
if (hasFlag(ExclusionFilters.dotPrefixed) && name.startsWith('.')) {
return true;
}
// Check hidden filter
if (hasFlag(ExclusionFilters.hidden) && isHidden) {
return true;
}
// Note: System file detection is platform-specific and may require
// additional platform-specific logic
return false;
}