| 397 | } |
| 398 | |
| 399 | String get_user_home_dir() { |
| 400 | auto ident = OS::get_singleton()->get_identifier(); |
| 401 | if (ident == "web") { |
| 402 | return OS::get_singleton()->get_user_data_dir(); |
| 403 | } else if (ident == "windows") { |
| 404 | return OS::get_singleton()->get_environment("USERPROFILE"); |
| 405 | } |
| 406 | return OS::get_singleton()->get_environment("HOME"); |
| 407 | } |
| 408 | |
| 409 | String expand_tilde(String path) { |
| 410 | if (path.is_empty() || path[0] != '~') { |
no test coverage detected