1/// Return the current user's home directory. 2/// 3/// Checks `HOME` first (Unix), then `USERPROFILE` (Windows fallback). 4pub fn home_dir() -> Option<std::path::PathBuf> { 5 std::env::var_os("HOME") 6 .or_else(|| std::env::var_os("USERPROFILE")) 7 .map(std::path::PathBuf::from) 8}