Added functions for detecting known folders per-platform. Not tested on Windows yet, but who cares?
This commit is contained in:
27
source/mijin/platform/folders.hpp
Normal file
27
source/mijin/platform/folders.hpp
Normal 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)
|
||||
Reference in New Issue
Block a user