ManaPlus
|
#include "fs/paths.h"
#include "fs/virtfs/fs.h"
#include "utils/checkutils.h"
#include "utils/stringutils.h"
#include <climits>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include "debug.h"
Go to the source code of this file.
Namespaces | |
anonymous_namespace{paths.cpp} | |
Functions | |
std::string | getRealPath (const std::string &str) |
bool | isRealPath (const std::string &str) |
bool | checkPath (const std::string &path) |
void | prepareFsPath (std::string &path) |
std::string & | fixDirSeparators (std::string &str) |
std::string | removeLast (const std::string &str) |
std::string | getSelfName () |
std::string | getPicturesDir () |
std::string | getHomePath () |
std::string | getPackageDir () |
void | setPackageDir (const std::string &dir) |
Variables | |
std::string | anonymous_namespace{paths.cpp}::mPackageDir |
bool checkPath | ( | const std::string & | path | ) |
Definition at line 121 of file paths.cpp.
Referenced by VirtFs::enumerateFiles(), VirtFs::exists(), VirtFs::getDirs(), VirtFs::getFiles(), VirtFs::getFilesWithDir(), VirtFs::getRealDir(), ConfigManager::initConfiguration(), Dirs::initUpdatesDir(), VirtFs::isDirectory(), VirtFs::FsDir::isSymbolicLink(), VirtFs::loadFile(), HelpWindow::loadHelp(), HelpWindow::loadHelpSimple(), loadHostsGroup(), loadTxtFile(), loadXMLFile(), VirtFs::openAppend(), VirtFs::openRead(), VirtFs::openWrite(), parseOptions(), LoginDialog::prepareUpdate(), Ea::LoginRecv::processUpdateHost(), and EAthena::LoginRecv::processUpdateHost2().
std::string& fixDirSeparators | ( | std::string & | str | ) |
Definition at line 149 of file paths.cpp.
References replaceAll().
Referenced by Font::Font(), and Font::loadFont().
std::string getHomePath | ( | ) |
Definition at line 252 of file paths.cpp.
References dirSeparator, findLast(), and VirtFs::getBaseDir().
Referenced by VirtFs::FsDir::init().
std::string getPackageDir | ( | ) |
Definition at line 293 of file paths.cpp.
References anonymous_namespace{paths.cpp}::mPackageDir.
Referenced by VirtFs::getPath().
std::string getPicturesDir | ( | ) |
Definition at line 207 of file paths.cpp.
References Files::existsLocal(), findCutFirst(), FOR_EACH, getRealPath(), VirtFs::getUserDir(), Files::loadTextFileLocal(), pathJoin(), and replaceAll().
Referenced by Dirs::initScreenshotDir().
std::string getRealPath | ( | const std::string & | str | ) |
Definition at line 84 of file paths.cpp.
Referenced by getPicturesDir(), Configuration::init(), VirtFs::FsDir::init(), and isRealPath().
std::string getSelfName | ( | ) |
Definition at line 200 of file paths.cpp.
Referenced by TestMain::TestMain().
bool isRealPath | ( | const std::string & | str | ) |
Definition at line 116 of file paths.cpp.
References getRealPath().
Referenced by Dirs::updateDataPath().
void prepareFsPath | ( | std::string & | path | ) |
Definition at line 132 of file paths.cpp.
References reportAlways, and sanitizePath().
Referenced by VirtFs::enumerateFiles(), VirtFs::exists(), VirtFs::getDirs(), VirtFs::getFiles(), VirtFs::getFilesWithDir(), VirtFs::getRealDir(), VirtFs::FsDir::init(), VirtFs::isDirectory(), VirtFs::FsDir::isSymbolicLink(), VirtFs::loadFile(), VirtFs::FsDir::mkdir(), VirtFs::mountDir(), VirtFs::mountDir2(), VirtFs::mountDirSilent(), VirtFs::mountDirSilent2(), VirtFs::mountZip(), VirtFs::mountZip2(), VirtFs::openAppend(), VirtFs::openRead(), VirtFs::openWrite(), VirtFs::ZipReader::readArchiveInfo(), VirtFs::FsDir::remove(), VirtFs::FsDir::setWriteDir(), VirtFs::unmountDir(), VirtFs::unmountDir2(), VirtFs::unmountDirSilent(), VirtFs::unmountDirSilent2(), VirtFs::unmountZip(), and VirtFs::unmountZip2().
std::string removeLast | ( | const std::string & | str | ) |
void setPackageDir | ( | const std::string & | dir | ) |
Definition at line 298 of file paths.cpp.
References anonymous_namespace{paths.cpp}::mPackageDir.
Referenced by Dirs::mountDataDir().