Added functions for detecting known folders per-platform. Not tested on Windows yet, but who cares?

This commit is contained in:
2025-03-02 17:19:18 +01:00
parent ba23cb0c70
commit 8f2cee4968
7 changed files with 159 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
#include "./filesystem.hpp"
#include "../platform/folders.hpp"
namespace mijin
{
@@ -37,7 +39,7 @@ std::vector<fs::path> OSFileSystemAdapter::getRoots()
fs::path OSFileSystemAdapter::getHomeFolder()
{
return "/home/mewin"; // very TODO
return getKnownFolder(KnownFolder::USER_HOME);
}
std::vector<FileInfo> OSFileSystemAdapter::listFiles(const fs::path& folder)