Home / Function/ same_file_system() — tailwindcss Function Reference

same_file_system() — tailwindcss Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  daabf474_f723_48b1_7aee_1bb9a40511eb["same_file_system()"]
  045303c3_4cc3_6dc5_845a_8eb234f08019["same_file_system()"]
  045303c3_4cc3_6dc5_845a_8eb234f08019 -->|calls| daabf474_f723_48b1_7aee_1bb9a40511eb
  045303c3_4cc3_6dc5_845a_8eb234f08019["same_file_system()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| 045303c3_4cc3_6dc5_845a_8eb234f08019
  be21cd9d_32f8_3eb7_b73d_40d5a95dc7c5["tmpdir()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| be21cd9d_32f8_3eb7_b73d_40d5a95dc7c5
  ea878296_643d_a792_237f_e683d50eeb36["device_num()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| ea878296_643d_a792_237f_e683d50eeb36
  6be2bc5c_2422_2c09_8c7a_3e92060e5ad1["mkdirp()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| 6be2bc5c_2422_2c09_8c7a_3e92060e5ad1
  c4df6a16_7c91_28e2_545c_2ae37976fd1d["symlink()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| c4df6a16_7c91_28e2_545c_2ae37976fd1d
  c81d27cd_cad5_fc47_4e0f_696d4392faff["follow_links()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| c81d27cd_cad5_fc47_4e0f_696d4392faff
  03f45cf3_87f6_e91f_bef8_2f9380aab005["assert_paths()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| 03f45cf3_87f6_e91f_bef8_2f9380aab005
  cc9ec348_9694_a24e_6a35_4ffb4c641398["is_dir()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| cc9ec348_9694_a24e_6a35_4ffb4c641398
  22e554e0_3279_5bba_cd5c_45aa591685d1["path()"]
  daabf474_f723_48b1_7aee_1bb9a40511eb -->|calls| 22e554e0_3279_5bba_cd5c_45aa591685d1
  style daabf474_f723_48b1_7aee_1bb9a40511eb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/walk.rs lines 2414–2440

    fn same_file_system() {
        use super::device_num;

        // If for some reason /sys doesn't exist or isn't a directory, just
        // skip this test.
        if !Path::new("/sys").is_dir() {
            return;
        }

        // If our test directory actually isn't a different volume from /sys,
        // then this test is meaningless and we shouldn't run it.
        let td = tmpdir();
        if device_num(td.path()).unwrap() == device_num("/sys").unwrap() {
            return;
        }

        mkdirp(td.path().join("same_file"));
        symlink("/sys", td.path().join("same_file").join("alink"));

        // Create a symlink to sys and enable following symlinks. If the
        // same_file_system option doesn't work, then this probably will hit a
        // permission error. Otherwise, it should just skip over the symlink
        // completely.
        let mut builder = WalkBuilder::new(td.path());
        builder.follow_links(true).same_file_system(true);
        assert_paths(td.path(), &builder, &["same_file", "same_file/alink"]);
    }

Subdomains

Called By

Frequently Asked Questions

What does same_file_system() do?
same_file_system() is a function in the tailwindcss codebase.
What does same_file_system() call?
same_file_system() calls 9 function(s): assert_paths, device_num, follow_links, is_dir, mkdirp, path, same_file_system, symlink, and 1 more.
What calls same_file_system()?
same_file_system() is called by 1 function(s): same_file_system.

Analyze Your Own Codebase

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

Try Supermodel Free