pub fn get_depth(patterns: &[&str], depth: Option<usize>) -> usizeExpand description
Computes the maximum depth required for a set of glob patterns.
Logic:
- If a depth is provided via the argument, it is returned directly.
- Otherwise, if any pattern contains “**”, returns TOP_MAX_DEPTH.
- Else, calculates the maximum folder level from patterns (using the folder count), regardless if they contain a single “*” or only “/”.
Returns at least 1.