ManaPlus
paths.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2011-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef UTILS_PATHS_H
23 #define UTILS_PATHS_H
24 
25 #include <string>
26 
27 #include "localconsts.h"
28 
29 std::string getRealPath(const std::string &str) A_WARN_UNUSED;
30 
31 bool isRealPath(const std::string &str) A_WARN_UNUSED;
32 
33 bool checkPath(const std::string &path) A_WARN_UNUSED;
34 
35 void prepareFsPath(std::string &path);
36 
37 std::string &fixDirSeparators(std::string &str);
38 
39 std::string removeLast(const std::string &str) A_WARN_UNUSED;
40 
41 std::string getSelfName() A_WARN_UNUSED;
42 
44 
45 #ifdef ANDROID
46 std::string getSdStoragePath() A_WARN_UNUSED;
47 #endif // ANDROID
48 
49 std::string getPackageDir() A_WARN_UNUSED;
50 
51 void setPackageDir(const std::string &dir);
52 
53 std::string getHomePath();
54 
55 #endif // UTILS_PATHS_H
#define A_WARN_UNUSED
Definition: localconsts.h:161
std::string & fixDirSeparators(std::string &str)
Definition: paths.cpp:149
std::string getRealPath(const std::string &str)
Definition: paths.cpp:84
std::string getPicturesDir()
Definition: paths.cpp:207
std::string getPackageDir()
Definition: paths.cpp:293
std::string getSelfName()
Definition: paths.cpp:200
bool checkPath(const std::string &path)
Definition: paths.cpp:121
void setPackageDir(const std::string &dir)
Definition: paths.cpp:298
std::string getHomePath()
Definition: paths.cpp:252
bool isRealPath(const std::string &str)
Definition: paths.cpp:116
void prepareFsPath(std::string &path)
Definition: paths.cpp:132
std::string removeLast(const std::string &str)
Definition: paths.cpp:158