| 1 |
#ifndef HEADER_PATH_H |
| 2 |
#define HEADER_PATH_H |
| 3 |
|
| 4 |
#include <string> |
| 5 |
|
| 6 |
/** |
| 7 |
* Path to a installed data. |
| 8 |
*/ |
| 9 |
class Path { |
| 10 |
private: |
| 11 |
std::string m_path; |
| 12 |
private: |
| 13 |
static Path dataPath(const std::string &file, bool writeable); |
| 14 |
static std::string localizePath(const std::string &original); |
| 15 |
static Path constructPath(const std::string &dir, |
| 16 |
const std::string &file); |
| 17 |
explicit Path(const std::string &file); |
| 18 |
public: |
| 19 |
static Path dataReadPath(const std::string &file); |
| 20 |
static Path dataWritePath(const std::string &file); |
| 21 |
|
| 22 |
static Path dataSystemPath(const std::string &file); |
| 23 |
static Path dataUserPath(const std::string &file); |
| 24 |
|
| 25 |
std::string getPosixName() const { return m_path; } |
| 26 |
std::string getNative() const; |
| 27 |
bool exists() const; |
| 28 |
}; |
| 29 |
|
| 30 |
#endif |
| 31 |
|