diff options
author | Adam <adam@sigterm.info> | 2013-12-14 22:55:10 -0800 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2013-12-14 22:55:10 -0800 |
commit | 59df199aaedf8018979c444eaa8cca59ff001877 (patch) | |
tree | e7d873a3250f50b2ecb7c4bc47d7fcf7a9cefefd /include/configreader.h | |
parent | 357d190074ee58809b31ea0c08543566168bddf6 (diff) | |
parent | ad47ea662698e72ff8f79b03512b1e7fe81bdf53 (diff) |
Merge pull request #689 from SaberUK/master+cxxify
Clean up various things.
Diffstat (limited to 'include/configreader.h')
-rw-r--r-- | include/configreader.h | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/include/configreader.h b/include/configreader.h index 0fbf234c3..a46f9cf95 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -225,10 +225,10 @@ class CoreExport ServerConfig , Log(LOG_PATH) , Module(MOD_PATH) { } - std::string PrependConfig(const std::string& fn) const { return ServerConfig::ExpandPath(Config, fn); } - std::string PrependData(const std::string& fn) const { return ServerConfig::ExpandPath(Data, fn); } - std::string PrependLog(const std::string& fn) const { return ServerConfig::ExpandPath(Log, fn); } - std::string PrependModule(const std::string& fn) const { return ServerConfig::ExpandPath(Module, fn); } + std::string PrependConfig(const std::string& fn) const { return FileSystem::ExpandPath(Config, fn); } + std::string PrependData(const std::string& fn) const { return FileSystem::ExpandPath(Data, fn); } + std::string PrependLog(const std::string& fn) const { return FileSystem::ExpandPath(Log, fn); } + std::string PrependModule(const std::string& fn) const { return FileSystem::ExpandPath(Module, fn); } }; /** Get a configuration tag @@ -551,30 +551,8 @@ class CoreExport ServerConfig void Fill(); - /** Returns true if the given string starts with a windows drive letter - */ - static bool StartsWithWindowsDriveLetter(const std::string& path); - bool ApplyDisabledCommands(const std::string& data); - /** Clean a filename, stripping the directories (and drives) from string. - * @param name Directory to tidy - * @return The cleaned filename - */ - static const char* CleanFilename(const char* name); - - /** Check if a file exists. - * @param file The full path to a file - * @return True if the file exists and is readable. - */ - static bool FileExists(const char* file); - - /** Expands a path fragment to a full path. - * @param base The base path to expand from - * @param fragment The path fragment to expand on top of base. - */ - static std::string ExpandPath(const std::string& base, const std::string& fragment); - /** Escapes a value for storage in a configuration key. * @param str The string to escape. * @param xml Are we using the XML config format? |