MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / FromNativeSeparators

Method FromNativeSeparators

Sources/Shared/IO/FileSystem.cpp:1119–1133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1117
1118#if defined(DEATH_TARGET_WINDOWS)
1119 String FileSystem::FromNativeSeparators(String path)
1120 {
1121 // Take ownership first if not already (e.g., directly from `String::nullTerminatedView()`)
1122 if (!path.isSmall() && path.deleter()) {
1123 path = String{path};
1124 }
1125
1126 for (char& c : path) {
1127 if (c == '\\') {
1128 c = '/';
1129 }
1130 }
1131
1132 return path;
1133 }
1134
1135 String FileSystem::ToNativeSeparators(String path)
1136 {

Callers

nothing calls this directly

Calls 2

isSmallMethod · 0.45
deleterMethod · 0.45

Tested by

no test coverage detected