Open Folder in File Explorer

This commit is contained in:
émeryc
2023-07-12 21:41:09 -04:00
parent e90776e6bb
commit 12e7cb0625
10 changed files with 46 additions and 14 deletions

17
Nuake/src/Core/OS.cpp Normal file
View File

@@ -0,0 +1,17 @@
#include "OS.h"
#include <chrono>
#include "String.h"
#include <Windows.h>
using namespace Nuake;
int OS::GetTime()
{
return static_cast<int>(std::chrono::system_clock::now().time_since_epoch().count());
}
void OS::OpenInFileExplorer(const std::string& filePath)
{
ShellExecuteA(nullptr, "open", "explorer.exe", ("/select," + std::string(filePath)).c_str(), nullptr, SW_SHOWDEFAULT);
}