Home / Function/ expand_tilde() — tailwindcss Function Reference

expand_tilde() — tailwindcss Function Reference

Architecture documentation for the expand_tilde() function in gitignore.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  2aba6383_fb10_9759_134b_ef68e0030b7e["expand_tilde()"]
  5f89b71b_214a_6d50_c5a8_016810afc389["parse_excludes_file()"]
  5f89b71b_214a_6d50_c5a8_016810afc389 -->|calls| 2aba6383_fb10_9759_134b_ef68e0030b7e
  aa111346_8758_31bb_dbaa_70e07f78c91a["parse_excludes_file2()"]
  aa111346_8758_31bb_dbaa_70e07f78c91a -->|calls| 2aba6383_fb10_9759_134b_ef68e0030b7e
  4b723be5_8ec6_0a8d_33ab_b8434a33c822["parse_excludes_file4()"]
  4b723be5_8ec6_0a8d_33ab_b8434a33c822 -->|calls| 2aba6383_fb10_9759_134b_ef68e0030b7e
  42991d00_48e0_a4e5_be1a_ddc6505d4057["home_dir()"]
  2aba6383_fb10_9759_134b_ef68e0030b7e -->|calls| 42991d00_48e0_a4e5_be1a_ddc6505d4057
  style 2aba6383_fb10_9759_134b_ef68e0030b7e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/ignore/src/gitignore.rs lines 676–682

fn expand_tilde(path: &str) -> String {
    let home = match home_dir() {
        None => return path.to_string(),
        Some(home) => home.to_string_lossy().into_owned(),
    };
    path.replace("~", &home)
}

Subdomains

Calls

Frequently Asked Questions

What does expand_tilde() do?
expand_tilde() is a function in the tailwindcss codebase.
What does expand_tilde() call?
expand_tilde() calls 1 function(s): home_dir.
What calls expand_tilde()?
expand_tilde() is called by 3 function(s): parse_excludes_file, parse_excludes_file2, parse_excludes_file4.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free