Soundux/src/helper/misc/misc.hpp

21 lines
580 B
C++
Raw Normal View History

#pragma once
#include <optional>
#include <string>
#include <vector>
namespace Soundux
{
namespace Helpers
{
#if defined(_WIN32)
std::wstring widen(const std::string &s);
std::string narrow(const std::wstring &s);
#endif
#if defined(__linux__)
std::optional<int> getPpid(int pid);
#endif
2021-03-18 20:46:33 +01:00
bool exec(const std::string &command, std::string &result);
2021-04-13 21:34:26 +02:00
bool deleteFile(const std::string &path, bool trash = true);
std::vector<std::string> splitByNewLine(const std::string &str);
} // namespace Helpers
} // namespace Soundux