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 6af14e61_8f0b_c760_15f0_580b156285cf["get_or_set_current_dir()"] b3ca296d_790b_9bf3_23ea_56e5c5c48565["walk.rs"] 6af14e61_8f0b_c760_15f0_580b156285cf -->|defined in| b3ca296d_790b_9bf3_23ea_56e5c5c48565 de47c3c4_7919_326b_65e2_dcc7c2bd96c6["build()"] de47c3c4_7919_326b_65e2_dcc7c2bd96c6 -->|calls| 6af14e61_8f0b_c760_15f0_580b156285cf 1c879887_8821_ee3a_d1d4_abfeca5c95df["build_parallel()"] 1c879887_8821_ee3a_d1d4_abfeca5c95df -->|calls| 6af14e61_8f0b_c760_15f0_580b156285cf d811da94_c4f9_9e35_657b_c71a6455675f["add_ignore()"] d811da94_c4f9_9e35_657b_c71a6455675f -->|calls| 6af14e61_8f0b_c760_15f0_580b156285cf eca52cc5_585d_423e_4169_6d5c159a861d["current_dir()"] 6af14e61_8f0b_c760_15f0_580b156285cf -->|calls| eca52cc5_585d_423e_4169_6d5c159a861d style 6af14e61_8f0b_c760_15f0_580b156285cf 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