Home / Function/ matched_path_or_any_parents() — tailwindcss Function Reference

matched_path_or_any_parents() — tailwindcss Function Reference

Architecture documentation for the matched_path_or_any_parents() function in gitignore.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  223c5f29_3f10_003b_c448_2f21000e41fa["matched_path_or_any_parents()"]
  61377720_4557_3c63_7653_b6ed73e2face["gitignore.rs"]
  223c5f29_3f10_003b_c448_2f21000e41fa -->|defined in| 61377720_4557_3c63_7653_b6ed73e2face
  78994562_f741_b984_8df0_fdebd0d531e2["is_empty()"]
  223c5f29_3f10_003b_c448_2f21000e41fa -->|calls| 78994562_f741_b984_8df0_fdebd0d531e2
  e2eccb71_07a8_538c_8e2d_d4832ec96745["strip()"]
  223c5f29_3f10_003b_c448_2f21000e41fa -->|calls| e2eccb71_07a8_538c_8e2d_d4832ec96745
  0a1ce0bf_34ad_22f6_c0b8_36129c8d4f94["matched_stripped()"]
  223c5f29_3f10_003b_c448_2f21000e41fa -->|calls| 0a1ce0bf_34ad_22f6_c0b8_36129c8d4f94
  style 223c5f29_3f10_003b_c448_2f21000e41fa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/gitignore.rs lines 221–243

    pub fn matched_path_or_any_parents<P: AsRef<Path>>(
        &self,
        path: P,
        is_dir: bool,
    ) -> Match<&Glob> {
        if self.is_empty() {
            return Match::None;
        }
        let mut path = self.strip(path.as_ref());
        assert!(!path.has_root(), "path is expected to be under the root");

        match self.matched_stripped(path, is_dir) {
            Match::None => (), // walk up
            a_match => return a_match,
        }
        while let Some(parent) = path.parent() {
            match self.matched_stripped(parent, /* is_dir */ true) {
                Match::None => path = parent, // walk up
                a_match => return a_match,
            }
        }
        Match::None
    }

Domain

Subdomains

Frequently Asked Questions

What does matched_path_or_any_parents() do?
matched_path_or_any_parents() is a function in the tailwindcss codebase, defined in crates/ignore/src/gitignore.rs.
Where is matched_path_or_any_parents() defined?
matched_path_or_any_parents() is defined in crates/ignore/src/gitignore.rs at line 221.
What does matched_path_or_any_parents() call?
matched_path_or_any_parents() calls 3 function(s): is_empty, matched_stripped, strip.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free