| 5192 | } |
| 5193 | |
| 5194 | String String::path_to_file(const String& p_path) const |
| 5195 | { |
| 5196 | // Don't get base dir for src, this is expected to be a dir already. |
| 5197 | String src = this->replace("\\", "/"); |
| 5198 | String dst = p_path.replace("\\", "/").get_base_dir(); |
| 5199 | String rel = src.path_to(dst); |
| 5200 | if (rel == dst) |
| 5201 | { // failed |
| 5202 | return p_path; |
| 5203 | } |
| 5204 | else |
| 5205 | { |
| 5206 | return rel + p_path.get_file(); |
| 5207 | } |
| 5208 | } |
| 5209 | |
| 5210 | String String::path_to(const String& p_path) const |
| 5211 | { |
nothing calls this directly
no test coverage detected