MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / openFolderDialogAsync

Function openFolderDialogAsync

source/MRViewer/MRFileDialog.cpp:587–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585}
586
587void openFolderDialogAsync( std::function<void ( const std::filesystem::path& )> callback, std::filesystem::path baseFolder )
588{
589 assert( callback );
590#ifndef __EMSCRIPTEN__
591 callback( openFolderDialog( std::move( baseFolder ) ) );
592#else
593 sDialogFilesCallback = [callback] ( const std::vector<std::filesystem::path>& paths )
594 {
595 if ( !paths.empty() )
596 {
597 if ( !paths[0].empty() )
598 FileDialogSignals::instance().onSelectFolder( paths[0] );
599 callback( paths[0] );
600 }
601 };
602 (void)baseFolder;
603#pragma clang diagnostic push
604#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
605 EM_ASM( open_directory_dialog_popup());
606#pragma clang diagnostic pop
607#endif
608}
609
610std::vector<std::filesystem::path> openFoldersDialog( std::filesystem::path baseFolder )
611{

Callers 1

actionMethod · 0.85

Calls 4

openFolderDialogFunction · 0.85
instanceFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected