| 1133 | } |
| 1134 | |
| 1135 | String FileSystem::ToNativeSeparators(String path) |
| 1136 | { |
| 1137 | // Take ownership first if not already (e.g., directly from `String::nullTerminatedView()`) |
| 1138 | if (!path.isSmall() && path.deleter()) { |
| 1139 | path = String{path}; |
| 1140 | } |
| 1141 | |
| 1142 | for (char& c : path) { |
| 1143 | if (c == '/') { |
| 1144 | c = '\\'; |
| 1145 | } |
| 1146 | } |
| 1147 | |
| 1148 | return path; |
| 1149 | } |
| 1150 | #endif |
| 1151 | |
| 1152 | String FileSystem::GetAbsolutePath(StringView path) |