| 5095 | } |
| 5096 | |
| 5097 | String String::path_to_file(const String &p_path) const { |
| 5098 | // Don't get base dir for src, this is expected to be a dir already. |
| 5099 | String src = replace_char('\\', '/'); |
| 5100 | String dst = p_path.replace_char('\\', '/').get_base_dir(); |
| 5101 | String rel = src.path_to(dst); |
| 5102 | if (rel == dst) { // failed |
| 5103 | return p_path; |
| 5104 | } else { |
| 5105 | return rel + p_path.get_file(); |
| 5106 | } |
| 5107 | } |
| 5108 | |
| 5109 | String String::path_to(const String &p_path) const { |
| 5110 | String src = replace_char('\\', '/'); |
no test coverage detected