2011-08-19 19:06:09 +00:00
|
|
|
#ifndef COMPONENTS_FILES_MACOSPATH_H
|
|
|
|
#define COMPONENTS_FILES_MACOSPATH_H
|
|
|
|
|
|
|
|
#if defined(macintosh) || defined(Macintosh) || defined(__APPLE__) || defined(__MACH__)
|
|
|
|
|
2022-06-08 21:25:50 +00:00
|
|
|
#include <filesystem>
|
2011-08-19 19:06:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \namespace Files
|
|
|
|
*/
|
|
|
|
namespace Files
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
2012-02-23 22:01:42 +00:00
|
|
|
* \struct MacOsPath
|
2011-08-19 19:06:09 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
struct MacOsPath
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2022-06-08 21:25:50 +00:00
|
|
|
MacOsPath(const std::string& application_name);
|
2011-08-19 19:06:09 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
/**
|
2022-06-08 21:25:50 +00:00
|
|
|
* \brief Return path to the local directory.
|
2022-09-22 18:26:05 +00:00
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2022-09-22 18:26:05 +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
|
|
|
|
|
|
|
/**
|
2012-02-23 22:01:42 +00:00
|
|
|
* \brief Return path to the global (system) directory.
|
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 getGlobalConfigPath() const;
|
2012-01-21 16:58:49 +00:00
|
|
|
|
2012-09-02 17:40:26 +00:00
|
|
|
/**
|
|
|
|
* \brief Return path to the runtime 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
|
|
|
* \return std::filesystem::path
|
2012-09-02 17:40:26 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getLocalPath() const;
|
2012-09-02 17:40:26 +00:00
|
|
|
|
2012-02-19 22:39:37 +00:00
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2022-09-22 18:26:05 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getCachePath() const;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief
|
|
|
|
*
|
2022-06-08 21:25:50 +00:00
|
|
|
* \return std::filesystem::path
|
2012-02-19 22:39:37 +00:00
|
|
|
*/
|
2022-06-08 21:25:50 +00:00
|
|
|
std::filesystem::path getGlobalDataPath() const;
|
2012-02-19 22:39:37 +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(macintosh) || defined(Macintosh) || defined(__APPLE__) || defined(__MACH__) */
|
|
|
|
|
|
|
|
#endif /* COMPONENTS_FILES_MACOSPATH_H */
|