2011-08-19 19:06:09 +00:00
|
|
|
#ifndef COMPONENTS_FILES_WINDOWSPATH_HPP
|
|
|
|
#define COMPONENTS_FILES_WINDOWSPATH_HPP
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(__WINDOWS__)
|
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
#include <filesystem>
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \namespace Files
|
|
|
|
*/
|
|
|
|
namespace Files
|
|
|
|
{
|
|
|
|
|
2012-09-08 16:47:31 +00:00
|
|
|
/**
|
|
|
|
* \struct WindowsPath
|
|
|
|
*/
|
2011-08-19 19:06:09 +00:00
|
|
|
struct WindowsPath
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
|
|
|
/**
|
2012-01-16 22:09:25 +00:00
|
|
|
* \brief WindowsPath constructor.
|
2022-09-22 18:26:05 +00:00
|
|
|
*
|
2012-09-08 16:47:31 +00:00
|
|
|
* \param [in] application_name - The name of the application.
|
2022-09-22 18:26:05 +00:00
|
|
|
*/
|
2012-09-08 16:47:31 +00:00
|
|
|
WindowsPath(const std::string& application_name);
|
|
|
|
|
2011-08-19 19:06:09 +00:00
|
|
|
/**
|
2012-02-19 22:39:37 +00:00
|
|
|
* \brief Returns user path i.e.:
|
|
|
|
* "X:\Documents And Settings\<User name>\My Documents\My Games\"
|
2011-08-19 19:06:09 +00:00
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2011-08-19 19:06:09 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getUserConfigPath() const;
|
2013-12-26 00:24:43 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getUserDataPath() const;
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Returns "X:\Program Files\"
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2011-08-19 19:06:09 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getGlobalConfigPath() const;
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
2012-01-21 00:14:35 +00:00
|
|
|
* \brief Return local path which is a location where
|
2011-08-19 19:06:09 +00:00
|
|
|
* an application was started
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2011-08-19 19:06:09 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getLocalPath() const;
|
2012-01-21 16:58:49 +00:00
|
|
|
|
2012-09-02 17:40:26 +00:00
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2012-09-02 17:40:26 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getCachePath() const;
|
2012-09-02 17:40:26 +00:00
|
|
|
|
2012-01-21 16:58:49 +00:00
|
|
|
/**
|
2012-02-23 22:01:42 +00:00
|
|
|
* \brief Return same path like getGlobalPath
|
2012-01-21 16:58:49 +00:00
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2012-01-21 16:58:49 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getGlobalDataPath() const;
|
2012-01-21 16:58:49 +00:00
|
|
|
|
2012-01-16 22:09:25 +00:00
|
|
|
/**
|
|
|
|
* \brief Gets the path of the installed Morrowind version if there is one.
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2012-01-16 22:09:25 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getInstallPath() const;
|
2012-09-08 16:47:31 +00:00
|
|
|
|
|
|
|
std::string mName;
|
2011-08-19 19:06:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace Files */
|
|
|
|
|
|
|
|
#endif /* defined(_WIN32) || defined(__WINDOWS__) */
|
|
|
|
|
|
|
|
#endif /* COMPONENTS_FILES_WINDOWSPATH_HPP */
|