| 1149 | } |
| 1150 | |
| 1151 | NS_PROJ_END |
| 1152 | |
| 1153 | // --------------------------------------------------------------------------- |
| 1154 | |
| 1155 | static 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 | |