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 bb299b16_f66b_04f3_7212_f4ec2939c6ee["create_folders()"] feee3bfc_c98f_77d0_353c_806b9f7bbd95["it_should_keep_globs_that_start_with_file_wildcards_as_is()"] feee3bfc_c98f_77d0_353c_806b9f7bbd95 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee ebe42402_27a6_1427_7253_6baf54466298["it_should_keep_globs_that_start_with_folder_wildcards_as_is()"] ebe42402_27a6_1427_7253_6baf54466298 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee a3600464_7847_afa0_ead1_63a487119929["it_should_move_the_starting_folder_to_the_path()"] a3600464_7847_afa0_ead1_63a487119929 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 76531907_720d_0933_45f4_3cfd5081bb66["it_should_move_the_starting_folders_to_the_path()"] 76531907_720d_0933_45f4_3cfd5081bb66 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 78ecb553_394f_b972_4184_14ac9671a46c["it_should_branch_expandable_folders()"] 78ecb553_394f_b972_4184_14ac9671a46c -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 8297bf34_44cf_0228_08f9_9b97a851e875["it_should_expand_multiple_expansions_in_the_same_folder()"] 8297bf34_44cf_0228_08f9_9b97a851e875 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 05a5b555_f083_1220_7f69_fd64d850259f["multiple_expansions_per_folder_starting_at_the_root()"] 05a5b555_f083_1220_7f69_fd64d850259f -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 4700dbfd_afbd_a2ff_9f74_914812bc3b86["it_should_stop_expanding_once_we_hit_a_wildcard()"] 4700dbfd_afbd_a2ff_9f74_914812bc3b86 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 0f4651b8_523e_72aa_cd8b_ada8c1e8da50["it_should_keep_the_negation_symbol_for_all_new_patterns()"] 0f4651b8_523e_72aa_cd8b_ada8c1e8da50 -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee 4e52ae77_9cb3_eeda_0f41_4a06f80cd14a["it_should_expand_a_complex_example()"] 4e52ae77_9cb3_eeda_0f41_4a06f80cd14a -->|calls| bb299b16_f66b_04f3_7212_f4ec2939c6ee style bb299b16_f66b_04f3_7212_f4ec2939c6ee 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
Called By
- 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()
- it_should_stop_expanding_once_we_hit_a_wildcard()
- multiple_expansions_per_folder_starting_at_the_root()
Source
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