MCPcopy Create free account
hub / github.com/OSGeo/PROJ / CreateDirectoryRecursively

Function CreateDirectoryRecursively

src/filemanager.cpp:1151–1164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1149}
1150
1151NS_PROJ_END
1152
1153// ---------------------------------------------------------------------------
1154
1155static void CreateDirectoryRecursively(PJ_CONTEXT *ctx,
1156 const std::string &path) {
1157 if (NS_PROJ::FileManager::exists(ctx, path.c_str()))
1158 return;
1159 auto pos = path.find_last_of("/\\");
1160 if (pos == 0 || pos == std::string::npos)
1161 return;
1162 CreateDirectoryRecursively(ctx, path.substr(0, pos));
1163 NS_PROJ::FileManager::mkdir(ctx, path.c_str());
1164}
1165
1166//! @endcond
1167

Callers 1

filemanager.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected