Home / Function/ create_folders() — tailwindcss Function Reference

create_folders() — tailwindcss Function Reference

Architecture documentation for the create_folders() function in glob.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  1120e755_7352_a393_37fa_f89d503fa82e["create_folders()"]
  d6210432_49e5_7bfc_e9c4_6cebc740bb16["glob.rs"]
  1120e755_7352_a393_37fa_f89d503fa82e -->|defined in| d6210432_49e5_7bfc_e9c4_6cebc740bb16
  dca18166_149b_54bb_d00f_7e928afbcdf4["it_should_keep_globs_that_start_with_file_wildcards_as_is()"]
  dca18166_149b_54bb_d00f_7e928afbcdf4 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  3d745131_d360_a0a8_3982_123b8b90ce60["it_should_keep_globs_that_start_with_folder_wildcards_as_is()"]
  3d745131_d360_a0a8_3982_123b8b90ce60 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  a5e488ce_4e4c_3cd4_2568_c411cd598e60["it_should_move_the_starting_folder_to_the_path()"]
  a5e488ce_4e4c_3cd4_2568_c411cd598e60 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  0f3b48c5_b4aa_a1f5_9293_6cfdb7f1baee["it_should_move_the_starting_folders_to_the_path()"]
  0f3b48c5_b4aa_a1f5_9293_6cfdb7f1baee -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  b8a8b78a_9bf5_a406_87c6_0bafa0786729["it_should_branch_expandable_folders()"]
  b8a8b78a_9bf5_a406_87c6_0bafa0786729 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  3a4a73cc_34d9_4751_b93c_030229a10901["it_should_expand_multiple_expansions_in_the_same_folder()"]
  3a4a73cc_34d9_4751_b93c_030229a10901 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  d0025a09_3db8_bbd6_204f_24c856166046["multiple_expansions_per_folder_starting_at_the_root()"]
  d0025a09_3db8_bbd6_204f_24c856166046 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  31336d39_6a8f_9b2e_6b67_dc85b37e2751["it_should_stop_expanding_once_we_hit_a_wildcard()"]
  31336d39_6a8f_9b2e_6b67_dc85b37e2751 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  9259113f_5ca3_7abe_937e_e0bbde50c264["it_should_keep_the_negation_symbol_for_all_new_patterns()"]
  9259113f_5ca3_7abe_937e_e0bbde50c264 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  2159ccdd_43fb_39e9_fdaa_0b4cefcfadd8["it_should_expand_a_complex_example()"]
  2159ccdd_43fb_39e9_fdaa_0b4cefcfadd8 -->|calls| 1120e755_7352_a393_37fa_f89d503fa82e
  style 1120e755_7352_a393_37fa_f89d503fa82e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/glob.rs lines 199–221

    fn create_folders(folders: &[&str]) -> String {
        // Create a temporary working directory
        let dir = tempdir().unwrap().into_path();

        // Initialize this directory as a git repository
        let _ = Command::new("git").arg("init").current_dir(&dir).output();

        // Create the necessary files
        for path in folders {
            // 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, "").unwrap();
        }

        let base = format!("{}", dir.display());

        base
    }

Domain

Subdomains

Frequently Asked Questions

What does create_folders() do?
create_folders() is a function in the tailwindcss codebase, defined in crates/oxide/src/glob.rs.
Where is create_folders() defined?
create_folders() is defined in crates/oxide/src/glob.rs at line 199.
What calls create_folders()?
create_folders() is called by 10 function(s): it_should_branch_expandable_folders, it_should_expand_a_complex_example, it_should_expand_multiple_expansions_in_the_same_folder, it_should_keep_globs_that_start_with_file_wildcards_as_is, it_should_keep_globs_that_start_with_folder_wildcards_as_is, it_should_keep_the_negation_symbol_for_all_new_patterns, it_should_move_the_starting_folder_to_the_path, it_should_move_the_starting_folders_to_the_path, and 2 more.

Analyze Your Own Codebase

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

Try Supermodel Free