Home / Function/ create_files_in() — tailwindcss Function Reference

create_files_in() — tailwindcss Function Reference

Architecture documentation for the create_files_in() function in scanner.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  96c928f4_eee8_bcbc_0339_e2dce4b2d810["create_files_in()"]
  2c5d72c1_5cbe_ebbe_4eca_30cd90f4d096["scan_with_globs()"]
  2c5d72c1_5cbe_ebbe_4eca_30cd90f4d096 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  ac52519b_c5e0_da99_f5cd_39121c08ca64["it_should_scan_absolute_paths()"]
  ac52519b_c5e0_da99_f5cd_39121c08ca64 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  682eb566_a24c_752f_94bd_e2d2090ab470["it_should_pick_up_new_files()"]
  682eb566_a24c_752f_94bd_e2d2090ab470 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  75e01ac5_c130_fb8f_fa19_fe178653d7d0["skips_ignore_files_outside_of_a_repo()"]
  75e01ac5_c130_fb8f_fa19_fe178653d7d0 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  126f20ab_bd9d_0195_b9e5_c82f0640d143["test_explicitly_ignore_explicitly_allowed_files()"]
  126f20ab_bd9d_0195_b9e5_c82f0640d143 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  db77f263_0e6c_f85a_544d_ccc9acef0c4d["test_works_with_filenames_containing_glob_characters()"]
  db77f263_0e6c_f85a_544d_ccc9acef0c4d -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  9b78adac_d326_702e_85a1_db56ea4b854e["test_ignore_files_can_be_included_with_custom_source_rule()"]
  9b78adac_d326_702e_85a1_db56ea4b854e -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  4c3eef86_3a81_e588_8747_63eab5c53ff5["test_allow_default_ignored_files()"]
  4c3eef86_3a81_e588_8747_63eab5c53ff5 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  c9e0ac96_3ec0_a408_5e55_fcddc7437ffa["test_allow_default_ignored_files_via_gitignore()"]
  c9e0ac96_3ec0_a408_5e55_fcddc7437ffa -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  30679ada_5092_6c1d_832b_7797b344dda9["test_allow_explicit_node_modules_paths()"]
  30679ada_5092_6c1d_832b_7797b344dda9 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  8cfb823b_4d4d_dc1b_914a_edf7407eae8a["test_manually_scanning_files_should_follow_all_rules()"]
  8cfb823b_4d4d_dc1b_914a_edf7407eae8a -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  e01208ed_2a25_8f8d_e05f_4de7d9e2f028["test_glob_with_symlinks()"]
  e01208ed_2a25_8f8d_e05f_4de7d9e2f028 -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  1236d2e2_9f4a_f330_5d1d_82167ae3b00f["test_globs_with_recursive_symlinks()"]
  1236d2e2_9f4a_f330_5d1d_82167ae3b00f -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  114ef02b_ee79_9c0e_c566_35fa34966c8a["test_partial_globs_with_symlinks()"]
  114ef02b_ee79_9c0e_c566_35fa34966c8a -->|calls| 96c928f4_eee8_bcbc_0339_e2dce4b2d810
  style 96c928f4_eee8_bcbc_0339_e2dce4b2d810 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/tests/scanner.rs lines 50–62

    fn create_files_in(dir: &path::Path, paths: &[(&str, &str)]) {
        // Create the necessary files
        for (path, contents) in paths {
            // Ensure we use the right path separator for the current platform
            let path = dir.join(path.replace('/', path::MAIN_SEPARATOR.to_string().as_str()));
            let parent = path.parent().unwrap();
            if !parent.exists() {
                fs::create_dir_all(parent).unwrap();
            }

            fs::write(path, contents).unwrap()
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does create_files_in() do?
create_files_in() is a function in the tailwindcss codebase.
What calls create_files_in()?
create_files_in() is called by 15 function(s): it_should_pick_up_new_files, it_should_scan_absolute_paths, scan_with_globs, skips_ignore_files_outside_of_a_repo, test_allow_default_ignored_files, test_allow_default_ignored_files_via_gitignore, test_allow_explicit_node_modules_paths, test_explicitly_ignore_explicitly_allowed_files, and 7 more.

Analyze Your Own Codebase

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

Try Supermodel Free