Platform folders  4.0.0
platform_folders.h
1 /*
2 Its is under the MIT license, to encourage reuse by cut-and-paste.
3 
4 The original files are hosted here: https://github.com/sago007/PlatformFolders
5 
6 Copyright (c) 2015 Poul Sander
7 
8 Permission is hereby granted, free of charge, to any person
9 obtaining a copy of this software and associated documentation files
10 (the "Software"), to deal in the Software without restriction,
11 including without limitation the rights to use, copy, modify, merge,
12 publish, distribute, sublicense, and/or sell copies of the Software,
13 and to permit persons to whom the Software is furnished to do so,
14 subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be
17 included in all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
23 BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
24 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 SOFTWARE.
27 */
28 
29 #ifndef SAGO_PLATFORM_FOLDERS_H
30 #define SAGO_PLATFORM_FOLDERS_H
31 
32 #include <vector>
33 #include <string>
34 
38 namespace sago {
39 
50 std::string getDataHome();
51 
62 std::string getConfigHome();
63 
74 std::string getCacheDir();
75 
92 void appendAdditionalDataDirectories(std::vector<std::string>& homes);
93 
110 void appendAdditionalConfigDirectories(std::vector<std::string>& homes);
111 
117 std::string getDesktopFolder();
118 
123 std::string getDocumentsFolder();
124 
129 std::string getDownloadFolder();
130 
136 std::string getDownloadFolder1();
137 
142 std::string getPicturesFolder();
143 
148 std::string getPublicFolder();
149 
154 std::string getMusicFolder();
155 
160 std::string getVideoFolder();
161 
172 std::string getSaveGamesFolder1();
173 
186 std::string getSaveGamesFolder2();
187 
188 #ifndef DOXYGEN_SHOULD_SKIP_THIS
189 
196 class PlatformFolders {
197 public:
198  PlatformFolders();
199  ~PlatformFolders();
205  std::string getDesktopFolder() const;
210  std::string getDocumentsFolder() const;
215  std::string getPicturesFolder() const;
219  std::string getPublicFolder() const;
225  std::string getDownloadFolder1() const;
230  std::string getMusicFolder() const;
235  std::string getVideoFolder() const;
247  std::string getSaveGamesFolder1() const;
248 private:
249  PlatformFolders(const PlatformFolders&);
250  PlatformFolders& operator=(const PlatformFolders&);
251 #if !defined(_WIN32) && !defined(__APPLE__)
252  struct PlatformFoldersData;
253  PlatformFoldersData* data;
254 #endif
255 };
256 
257 #endif // skip doxygen
258 
259 
260 } //namespace sago
261 
262 #endif /* PLATFORM_FOLDERS_H */
std::string getDownloadFolder()
Definition: platform_folders.h:38
std::string getPublicFolder()
void appendAdditionalConfigDirectories(std::vector< std::string > &homes)
std::string getDesktopFolder()
std::string getCacheDir()
std::string getDocumentsFolder()
std::string getDownloadFolder1()
std::string getConfigHome()
void appendAdditionalDataDirectories(std::vector< std::string > &homes)
std::string getMusicFolder()
std::string getSaveGamesFolder2()
std::string getPicturesFolder()
std::string getVideoFolder()
std::string getSaveGamesFolder1()
std::string getDataHome()