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