MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / NFD_PickFolderN

Function NFD_PickFolderN

extern/nfd/nfd_portal.cpp:1393–1414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1391}
1392
1393nfdresult_t NFD_PickFolderN(nfdnchar_t** outPath, const nfdnchar_t* defaultPath) {
1394 (void)defaultPath; // Default path not supported for portal backend
1395
1396 DBusMessage* msg;
1397 {
1398 const nfdresult_t res = NFD_DBus_OpenFile<false, true>(msg, nullptr, 0);
1399 if (res != NFD_OKAY) {
1400 return res;
1401 }
1402 }
1403 DBusMessage_Guard msg_guard(msg);
1404
1405 const char* uri;
1406 {
1407 const nfdresult_t res = ReadResponseUrisSingle(msg, uri);
1408 if (res != NFD_OKAY) {
1409 return res;
1410 }
1411 }
1412
1413 return AllocAndCopyFilePath(uri, *outPath);
1414}
1415
1416nfdresult_t NFD_PathSet_GetCount(const nfdpathset_t* pathSet, nfdpathsetsize_t* count) {
1417 assert(pathSet);

Callers

nothing calls this directly

Calls 2

ReadResponseUrisSingleFunction · 0.85
AllocAndCopyFilePathFunction · 0.85

Tested by

no test coverage detected