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.

Function rust Oxide Scanner called by 10

Entity Profile

Dependency Diagram

graph TD
  671ea48f_f03a_71df_9af3_69fa925411c8["create_folders()"]
  06f0538c_a174_ca7e_0254_932670828484["glob.rs"]
  671ea48f_f03a_71df_9af3_69fa925411c8 -->|defined in| 06f0538c_a174_ca7e_0254_932670828484
  a9fa3e09_b7ac_ea22_ba93_9214ea7e399b["it_should_keep_globs_that_start_with_file_wildcards_as_is()"]
  a9fa3e09_b7ac_ea22_ba93_9214ea7e399b -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  5c2d45a5_abc7_c45a_706c_11e25637ec03["it_should_keep_globs_that_start_with_folder_wildcards_as_is()"]
  5c2d45a5_abc7_c45a_706c_11e25637ec03 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  5465714b_387b_decd_01b7_53e7b01dc483["it_should_move_the_starting_folder_to_the_path()"]
  5465714b_387b_decd_01b7_53e7b01dc483 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  847e0586_277e_6a4f_0f8f_ca46e1fe3268["it_should_move_the_starting_folders_to_the_path()"]
  847e0586_277e_6a4f_0f8f_ca46e1fe3268 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  df1eba22_2076_957e_1cdb_e2919d9505cf["it_should_branch_expandable_folders()"]
  df1eba22_2076_957e_1cdb_e2919d9505cf -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  ac1117da_7997_9944_8226_d88571a70197["it_should_expand_multiple_expansions_in_the_same_folder()"]
  ac1117da_7997_9944_8226_d88571a70197 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  db6874ed_71c4_ce46_b62a_4c9b75d00d32["multiple_expansions_per_folder_starting_at_the_root()"]
  db6874ed_71c4_ce46_b62a_4c9b75d00d32 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  dfeacf7a_9e24_5a3b_0173_0c401aafd4be["it_should_stop_expanding_once_we_hit_a_wildcard()"]
  dfeacf7a_9e24_5a3b_0173_0c401aafd4be -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  af2ab9a8_54d8_5ed0_a264_a364c1856996["it_should_keep_the_negation_symbol_for_all_new_patterns()"]
  af2ab9a8_54d8_5ed0_a264_a364c1856996 -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  0be0323b_8cd6_f27b_a8db_ffbfcc66ccff["it_should_expand_a_complex_example()"]
  0be0323b_8cd6_f27b_a8db_ffbfcc66ccff -->|calls| 671ea48f_f03a_71df_9af3_69fa925411c8
  style 671ea48f_f03a_71df_9af3_69fa925411c8 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