pub fn check_empty_dir_cleanup(
filter: Option<&FilterSettings>,
we_created_dir: bool,
anything_copied: bool,
relative_path: &Path,
is_root: bool,
is_dry_run: bool,
) -> EmptyDirActionExpand description
Determine what to do with an empty directory when filtering is active.
This is called when we created a directory but nothing was copied into it (no files, symlinks, or child directories). The decision depends on whether the directory itself was directly matched by an include pattern, or if we only entered it to look for potential matches inside.
§Arguments
filter- the active filter settings (None means no filtering)we_created_dir- whether we created this directory (vs it already existed)anything_copied- whether any content was copied into this directoryrelative_path- path relative to the source root (for pattern matching)is_root- whether this is the root (user-specified) source directoryis_dry_run- whether we’re in dry-run mode