Files
OpenVulkano/openVulkanoCpp/IO/AppFolders.hpp
2023-10-03 19:52:23 +02:00

39 lines
1.1 KiB
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <filesystem>
#include <optional>
namespace OpenVulkano
{
class AppFolders
{
static AppFolders INSTANCE;
std::filesystem::path appDataHome, appConfigHome, appState, appDataCache, appTemp;
AppFolders(std::string_view appName);
AppFolders(const std::filesystem::path& dir, std::optional<std::string_view> appName);
public:
static void Init(std::string_view appName);
static void Init(const std::filesystem::path& dir, std::optional<std::string_view> appName);
[[nodiscard]] static const std::filesystem::path& GetAppDataHomeDir();
[[nodiscard]] static const std::filesystem::path& GetAppConfigHomeDir();
[[nodiscard]] static const std::filesystem::path& GetAppStateDir();
[[nodiscard]] static const std::filesystem::path& GetAppCacheDir();
[[nodiscard]] static const std::filesystem::path& GetAppTempDir();
};
}