2011-08-19 19:06:09 +00:00
|
|
|
#ifndef COMPONENTS_FILES_LINUXPATH_H
|
|
|
|
#define COMPONENTS_FILES_LINUXPATH_H
|
|
|
|
|
2016-08-06 18:00:27 +00:00
|
|
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
2011-08-19 19:06:09 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
#include <filesystem>
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \namespace Files
|
|
|
|
*/
|
|
|
|
namespace Files
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \struct LinuxPath
|
|
|
|
*/
|
|
|
|
struct LinuxPath
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2012-09-08 16:47:31 +00:00
|
|
|
LinuxPath(const std::string& application_name);
|
2022-09-22 18:26:05 +00:00
|
|
|
|
|
|
|
/**
|
2012-01-21 00:14:35 +00:00
|
|
|
* \brief Return path to the user directory.
|
2022-09-22 18:26:05 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getUserConfigPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getUserDataPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
|
|
|
/**
|
2013-12-25 23:28:19 +00:00
|
|
|
* \brief Return path to the global (system) directory where config files can be placed.
|
2022-09-22 18:26:05 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getGlobalConfigPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
|
|
|
/**
|
2011-08-19 19:06:09 +00:00
|
|
|
* \brief Return path to the runtime configuration directory which is the
|
|
|
|
* place where an application was started.
|
2022-09-22 18:26:05 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getLocalPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2012-01-21 16:58:49 +00:00
|
|
|
/**
|
2013-12-25 23:28:19 +00:00
|
|
|
* \brief Return path to the global (system) directory where game files can be placed.
|
2012-01-21 16:58:49 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getGlobalDataPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2012-09-02 17:40:26 +00:00
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getCachePath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2012-01-17 18:18:17 +00:00
|
|
|
/**
|
|
|
|
* \brief Gets the path of the installed Morrowind version if there is one.
|
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getInstallPath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2012-09-08 16:47:31 +00:00
|
|
|
std::string mName;
|
2011-08-19 19:06:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace Files */
|
|
|
|
|
2016-08-06 18:00:27 +00:00
|
|
|
#endif /* defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) */
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
#endif /* COMPONENTS_FILES_LINUXPATH_H */
|