pub(crate) fn matches_filters(
_path: &Path,
metadata: &Metadata,
opts: &Options,
) -> boolExpand description
Test a directory entry’s metadata against all active filters.
This function checks the entry’s type, size, modification time, permissions,
owner, and group against the corresponding filter in Options. If any
active filter fails, returns false; otherwise returns true.
§Arguments
_path— the filesystem path (currently unused but available for future use)metadata— thestd::fs::Metadatafor the entry (may be symlink or resolved)opts— the runtime options containing all filter configurations
§Filter evaluation order
- Type filter (
-t) - Size filter (
-s) — only applies to regular files - Modification time filter (
-m) - Permission filter (
-p) — comparesmode & 0o7777against octal target - User filter (
-u) — looks up UID → username viagetpwuid() - Group filter (
-g) — looks up GID → group name viagetgrgid()