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
  d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23["create_folders()"]
  150fa9e2_8f67_dc82_a1d2_eef47d3aa350["it_should_keep_globs_that_start_with_file_wildcards_as_is()"]
  150fa9e2_8f67_dc82_a1d2_eef47d3aa350 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  43710e7b_a643_dffa_82b2_e4b1af6f73aa["it_should_keep_globs_that_start_with_folder_wildcards_as_is()"]
  43710e7b_a643_dffa_82b2_e4b1af6f73aa -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  7ba7da91_9b5a_1154_92ba_37a632534483["it_should_move_the_starting_folder_to_the_path()"]
  7ba7da91_9b5a_1154_92ba_37a632534483 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  40cea23c_7632_46a0_94b4_7724d0beea7a["it_should_move_the_starting_folders_to_the_path()"]
  40cea23c_7632_46a0_94b4_7724d0beea7a -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  e08a4f18_5472_a233_465a_965af187c192["it_should_branch_expandable_folders()"]
  e08a4f18_5472_a233_465a_965af187c192 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  7e11a91a_c7d6_dd68_faa6_be90c2f0b475["it_should_expand_multiple_expansions_in_the_same_folder()"]
  7e11a91a_c7d6_dd68_faa6_be90c2f0b475 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  deea2001_04ca_f45b_aa77_50167b4a1044["multiple_expansions_per_folder_starting_at_the_root()"]
  deea2001_04ca_f45b_aa77_50167b4a1044 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  650f57b2_ba40_0637_2b17_cd47af9210b0["it_should_stop_expanding_once_we_hit_a_wildcard()"]
  650f57b2_ba40_0637_2b17_cd47af9210b0 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  77dd3a20_cd9a_0896_bac8_f4035efd2362["it_should_keep_the_negation_symbol_for_all_new_patterns()"]
  77dd3a20_cd9a_0896_bac8_f4035efd2362 -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  5cc13c0c_f925_6d05_8365_d0d4b20ef85c["it_should_expand_a_complex_example()"]
  5cc13c0c_f925_6d05_8365_d0d4b20ef85c -->|calls| d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23
  style d5e8219a_41bf_5cdb_2ab9_fa6f6a6dbb23 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.
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