MCPcopy Create free account
hub / github.com/VCVRack/Rack / openDirectory

Function openDirectory

src/system.cpp:892–913  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

890
891
892void openDirectory(const std::string& path) {
893 if (path.empty())
894 return;
895
896 INFO("Opening directory %s", path.c_str());
897
898 std::string pathL = path;
899 std::thread t([=] {
900#if defined ARCH_LIN
901 std::string command = "xdg-open \"" + pathL + "\"";
902 (void) std::system(command.c_str());
903#endif
904#if defined ARCH_MAC
905 std::string command = "open \"" + pathL + "\"";
906 std::system(command.c_str());
907#endif
908#if defined ARCH_WIN
909 ShellExecuteW(NULL, L"explore", string::UTF8toUTF16(pathL).c_str(), NULL, NULL, SW_SHOWDEFAULT);
910#endif
911 });
912 t.detach();
913}
914
915
916void runProcessDetached(const std::string& path) {

Callers 2

appendContextMenuMethod · 0.85
onActionMethod · 0.85

Calls 3

systemFunction · 0.85
UTF8toUTF16Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected