Home / Function/ max_depth() — tailwindcss Function Reference

max_depth() — tailwindcss Function Reference

Architecture documentation for the max_depth() function in walk.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  428176d2_ded6_24a9_58be_fc5046e7235c["max_depth()"]
  4ad2677e_56c0_f1a2_7b12_5382c0527d1c["max_depth()"]
  4ad2677e_56c0_f1a2_7b12_5382c0527d1c -->|calls| 428176d2_ded6_24a9_58be_fc5046e7235c
  4ad2677e_56c0_f1a2_7b12_5382c0527d1c["max_depth()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| 4ad2677e_56c0_f1a2_7b12_5382c0527d1c
  be21cd9d_32f8_3eb7_b73d_40d5a95dc7c5["tmpdir()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| be21cd9d_32f8_3eb7_b73d_40d5a95dc7c5
  6be2bc5c_2422_2c09_8c7a_3e92060e5ad1["mkdirp()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| 6be2bc5c_2422_2c09_8c7a_3e92060e5ad1
  e3491efe_c25e_6614_b6f7_1a3834b9d724["wfile()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| e3491efe_c25e_6614_b6f7_1a3834b9d724
  03f45cf3_87f6_e91f_bef8_2f9380aab005["assert_paths()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| 03f45cf3_87f6_e91f_bef8_2f9380aab005
  9dbc0f8b_e5d8_bd69_1707_cf790a93bf6e["path()"]
  428176d2_ded6_24a9_58be_fc5046e7235c -->|calls| 9dbc0f8b_e5d8_bd69_1707_cf790a93bf6e
  style 428176d2_ded6_24a9_58be_fc5046e7235c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/walk.rs lines 2258–2279

    fn max_depth() {
        let td = tmpdir();
        mkdirp(td.path().join("a/b/c"));
        wfile(td.path().join("foo"), "");
        wfile(td.path().join("a/foo"), "");
        wfile(td.path().join("a/b/foo"), "");
        wfile(td.path().join("a/b/c/foo"), "");

        let mut builder = WalkBuilder::new(td.path());
        assert_paths(
            td.path(),
            &builder,
            &["a", "a/b", "a/b/c", "foo", "a/foo", "a/b/foo", "a/b/c/foo"],
        );
        assert_paths(td.path(), builder.max_depth(Some(0)), &[]);
        assert_paths(td.path(), builder.max_depth(Some(1)), &["a", "foo"]);
        assert_paths(
            td.path(),
            builder.max_depth(Some(2)),
            &["a", "a/b", "foo", "a/foo"],
        );
    }

Subdomains

Called By

Frequently Asked Questions

What does max_depth() do?
max_depth() is a function in the tailwindcss codebase.
What does max_depth() call?
max_depth() calls 6 function(s): assert_paths, max_depth, mkdirp, path, tmpdir, wfile.
What calls max_depth()?
max_depth() is called by 1 function(s): max_depth.

Analyze Your Own Codebase

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

Try Supermodel Free