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

@@ -0,0 +1,27 @@
#pragma once
#if !defined(MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED)
#define MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED 1
#include "../internal/common.hpp"
#include <filesystem>
namespace fs = std::filesystem;
namespace mijin
{
enum class KnownFolder
{
USER_HOME,
TEMP,
CACHE_ROOT,
USER_CONFIG_ROOT,
USER_DATA_ROOT
};
[[nodiscard]]
fs::path getKnownFolder(KnownFolder folder) MIJIN_NOEXCEPT;
}
#endif // defined(MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED)