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

Method mkdir

src/filemanager.cpp:1048–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046// ---------------------------------------------------------------------------
1047
1048bool FileManager::mkdir(PJ_CONTEXT *ctx, const char *filename) {
1049 if (ctx->fileApi.mkdir_cbk) {
1050 return ctx->fileApi.mkdir_cbk(ctx, filename, ctx->fileApi.user_data) !=
1051 0;
1052 }
1053
1054#ifdef _WIN32
1055 try {
1056 return _wmkdir(UTF8ToWString(filename).c_str()) == 0;
1057 } catch (const std::exception &e) {
1058 pj_log(ctx, PJ_LOG_DEBUG, "%s", e.what());
1059 return false;
1060 }
1061#else
1062 (void)ctx;
1063 return ::mkdir(filename, 0755) == 0;
1064#endif
1065}
1066
1067// ---------------------------------------------------------------------------
1068

Callers 1

mainFunction · 0.80

Calls 3

UTF8ToWStringFunction · 0.85
pj_logFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected