blob: cd2ca601b8a9d25ff55ff27b085db373573af016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*
Ousía
Copyright (C) 2014, 2015 Benjamin Paaßen, Andreas Stöckel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file SpecialPaths.hpp
*
* Access to platform specific special paths.
*
* @author Andreas Stöckel (astoecke@techfak.uni-bielefeld.de)
*/
#ifndef _OUSIA_SPECIAL_PATHS_HPP_
#define _OUSIA_SPECIAL_PATHS_HPP_
#include <string>
namespace ousia {
/**
* Class containing static functions providing access to special paths.
*/
class SpecialPaths {
public:
/**
* Returns the home directory of the current user or an empty string if the
* functionality is not available.
*
* @return path to the home director or empty string on failure.
*/
static std::string getHomeDir();
/**
* Returns the global application data directory (e.g. /usr/share/ousia on
* unix).
*
* @return path to the installation data directory, empty string on failure.
*/
static std::string getGlobalDataDir();
/**
* Returns the local application data directory (e.g.
* /home/usre/.local/share/ousia on unix).
*
* @return path to the local data directory, empty string on failure.
*/
static std::string getLocalDataDir();
/**
* Returns the path to the application data when running a debug build.
*
* @return path to the application data when running a debug build. Returns
* an empty string otherwise.
*/
static std::string getDebugDataDir();
/**
* Returns the path to the test data when running a debug build with enabled
* tests.
*
* @return path to the test data when running a debug build. Returns
* "./testdata" otherwise.
*/
static std::string getDebugTestdataDir();
};
}
#endif /* _OUSIA_SPECIAL_PATHS_HPP_ */
|