get_or_set_current_dir() — tailwindcss Function Reference
Architecture documentation for the get_or_set_current_dir() function in walk.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 0a61df63_b8ac_a29f_e665_790a24f2055c["get_or_set_current_dir()"] 8031325b_dcd2_8c49_70e7_46191ce03a79["walk.rs"] 0a61df63_b8ac_a29f_e665_790a24f2055c -->|defined in| 8031325b_dcd2_8c49_70e7_46191ce03a79 7fdc5de6_ca45_c05a_0113_cfaee5250ec1["build()"] 7fdc5de6_ca45_c05a_0113_cfaee5250ec1 -->|calls| 0a61df63_b8ac_a29f_e665_790a24f2055c 00168c4f_f053_bde0_b775_fab634708fc2["build_parallel()"] 00168c4f_f053_bde0_b775_fab634708fc2 -->|calls| 0a61df63_b8ac_a29f_e665_790a24f2055c 2a34f521_2a97_93f6_4346_b7e4482c25d2["add_ignore()"] 2a34f521_2a97_93f6_4346_b7e4482c25d2 -->|calls| 0a61df63_b8ac_a29f_e665_790a24f2055c 0166b005_f5f4_27ee_3e5e_8f4b333d911a["current_dir()"] 0a61df63_b8ac_a29f_e665_790a24f2055c -->|calls| 0166b005_f5f4_27ee_3e5e_8f4b333d911a style 0a61df63_b8ac_a29f_e665_790a24f2055c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/ignore/src/walk.rs lines 1000–1018
fn get_or_set_current_dir(&self) -> Option<&Path> {
let result = self.global_gitignores_relative_to.get_or_init(|| {
let result = std::env::current_dir().map_err(Arc::new);
match result {
Ok(ref path) => {
log::trace!("automatically discovered CWD: {}", path.display());
}
Err(ref err) => {
log::debug!(
"failed to find CWD \
(global gitignores will be ignored): \
{err}"
);
}
}
result
});
result.as_ref().ok().map(|path| &**path)
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does get_or_set_current_dir() do?
get_or_set_current_dir() is a function in the tailwindcss codebase, defined in crates/ignore/src/walk.rs.
Where is get_or_set_current_dir() defined?
get_or_set_current_dir() is defined in crates/ignore/src/walk.rs at line 1000.
What does get_or_set_current_dir() call?
get_or_set_current_dir() calls 1 function(s): current_dir.
What calls get_or_set_current_dir()?
get_or_set_current_dir() is called by 3 function(s): add_ignore, build, build_parallel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free