mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Added OS open URL function
This commit is contained in:
@@ -67,4 +67,9 @@ int OS::RenameDirectory(const Ref<Directory>& dir, const std::string& newName)
|
||||
void OS::ShowInFileExplorer(const std::string& filePath)
|
||||
{
|
||||
ShellExecuteA(nullptr, "open", "explorer.exe", ("/select," + std::string(filePath)).c_str(), nullptr, SW_SHOWDEFAULT);
|
||||
}
|
||||
|
||||
void OS::OpenURL(const std::string& url)
|
||||
{
|
||||
ShellExecute(nullptr, nullptr, std::wstring(url.begin(), url.end()).c_str(), 0, 0, SW_SHOW);
|
||||
}
|
||||
@@ -15,5 +15,6 @@ namespace Nuake
|
||||
static int OS::RenameFile(const Ref<File>& file, const std::string& newName);
|
||||
static int OS::RenameDirectory(const Ref<Directory>& dir, const std::string& newName);
|
||||
static void ShowInFileExplorer(const std::string& filePath);
|
||||
static void OpenURL(const std::string& url);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user