Open Folder in File Explorer
This commit is contained in:
17
Nuake/src/Core/OS.cpp
Normal file
17
Nuake/src/Core/OS.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user