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