pub fn build_plan_with_options(
root: &Path,
patterns: &[String],
options: &PlanOptions,
) -> Result<RemovalPlan>Expand description
Builds a read-only removal plan with optional modification-time filtering.
Patterns are combined with OR. When a modification range is present, only regular
files satisfying both the pattern condition and range directly match; their ancestors
are retained. An empty pattern list omits the pattern condition, but at least one
pattern or a range is required. Without a range, behavior matches build_plan.
This operation does not follow child symbolic links and does not provide a filesystem snapshot. A failure to obtain required file metadata aborts the entire plan.
ยงErrors
Invalid conditions, roots, and patterns carry ValidationError; traversal, metadata,
and path-encoding failures are runtime errors. No partial plan is returned.