41 lines
		
	
	
		
			992 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			992 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| #if !defined(MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED)
 | |
| #define MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED 1
 | |
| 
 | |
| #include "../internal/common.hpp"
 | |
| #include "../util/flag.hpp"
 | |
| 
 | |
| #include <filesystem>
 | |
| #include <vector>
 | |
| 
 | |
| namespace fs = std::filesystem;
 | |
| 
 | |
| namespace mijin
 | |
| {
 | |
| enum class KnownFolder
 | |
| {
 | |
|     USER_HOME,
 | |
|     TEMP,
 | |
|     CACHE_ROOT,
 | |
|     USER_CONFIG_ROOT,
 | |
|     USER_DATA_ROOT
 | |
| };
 | |
| 
 | |
| MIJIN_DEFINE_FLAG(IncludeUser);
 | |
| MIJIN_DEFINE_FLAG(IncludeSystem);
 | |
| 
 | |
| [[nodiscard]]
 | |
| fs::path getKnownFolder(KnownFolder folder) MIJIN_NOEXCEPT;
 | |
| 
 | |
| [[nodiscard]]
 | |
| std::vector<fs::path> getAllConfigFolders(IncludeUser includeUser = IncludeUser::YES,
 | |
|                                           IncludeSystem includeSystem = IncludeSystem::YES) MIJIN_NOEXCEPT;
 | |
| 
 | |
| [[nodiscard]]
 | |
| std::vector<fs::path> getAllDataFolders(IncludeUser includeUser = IncludeUser::YES,
 | |
|                                           IncludeSystem includeSystem = IncludeSystem::YES) MIJIN_NOEXCEPT;
 | |
| }
 | |
| 
 | |
| #endif // defined(MIJIN_PLATFORM_FOLDERS_HPP_INCLUDED)
 |