|
Otclient 1.0
14/8/2020
|
#include <resourcemanager.h>
Public Member Functions | |
| void | init (const char *argv0) |
| void | terminate () |
| bool | discoverWorkDir (const std::string &existentFile) |
| bool | setupUserWriteDir (const std::string &appWriteDirName) |
| bool | setWriteDir (const std::string &writeDir, bool create=false) |
| bool | addSearchPath (const std::string &path, bool pushFront=false) |
| bool | removeSearchPath (const std::string &path) |
| void | searchAndAddPackages (const std::string &packagesDir, const std::string &packageExt) |
| bool | fileExists (const std::string &fileName) |
| bool | directoryExists (const std::string &directoryName) |
| void | readFileStream (const std::string &fileName, std::iostream &out) |
| std::string | readFileContents (const std::string &fileName) |
| bool | writeFileBuffer (const std::string &fileName, const uchar *data, uint size) |
| bool | writeFileContents (const std::string &fileName, const std::string &data) |
| bool | writeFileStream (const std::string &fileName, std::iostream &in) |
| FileStreamPtr | openFile (const std::string &fileName) |
| FileStreamPtr | appendFile (const std::string &fileName) |
| FileStreamPtr | createFile (const std::string &fileName) |
| bool | deleteFile (const std::string &fileName) |
| bool | makeDir (const std::string directory) |
| std::list< std::string > | listDirectoryFiles (const std::string &directoryPath="") |
| std::vector< std::string > | getDirectoryFiles (const std::string &path, bool filenameOnly, bool recursive) |
| std::string | resolvePath (const std::string &path) |
| std::string | getRealDir (const std::string &path) |
| std::string | getRealPath (const std::string &path) |
| std::string | getBaseDir () |
| std::string | getUserDir () |
| std::string | getWriteDir () |
| std::string | getWorkDir () |
| std::deque< std::string > | getSearchPaths () |
| std::string | guessFilePath (const std::string &filename, const std::string &type) |
| bool | isFileType (const std::string &filename, const std::string &type) |
| ticks_t | getFileTime (const std::string &filename) |
Protected Member Functions | |
| std::vector< std::string > | discoverPath (const fs::path &path, bool filenameOnly, bool recursive) |
Definition at line 33 of file resourcemanager.h.
| bool ResourceManager::addSearchPath | ( | const std::string & | path, |
| bool | pushFront = false |
||
| ) |
| FileStreamPtr ResourceManager::appendFile | ( | const std::string & | fileName | ) |
| FileStreamPtr ResourceManager::createFile | ( | const std::string & | fileName | ) |
Definition at line 250 of file resourcemanager.cpp.


| bool ResourceManager::deleteFile | ( | const std::string & | fileName | ) |
Definition at line 258 of file resourcemanager.cpp.


| bool ResourceManager::directoryExists | ( | const std::string & | directoryName | ) |
|
protected |
Definition at line 289 of file resourcemanager.cpp.


| bool ResourceManager::discoverWorkDir | ( | const std::string & | existentFile | ) |
Definition at line 45 of file resourcemanager.cpp.


| bool ResourceManager::fileExists | ( | const std::string & | fileName | ) |
Definition at line 157 of file resourcemanager.cpp.


| std::string ResourceManager::getBaseDir | ( | ) |
| std::vector< std::string > ResourceManager::getDirectoryFiles | ( | const std::string & | path, |
| bool | filenameOnly, | ||
| bool | recursive | ||
| ) |
Definition at line 280 of file resourcemanager.cpp.


| ticks_t ResourceManager::getFileTime | ( | const std::string & | filename | ) |
Definition at line 367 of file resourcemanager.cpp.


| std::string ResourceManager::getRealDir | ( | const std::string & | path | ) |
Definition at line 329 of file resourcemanager.cpp.


| std::string ResourceManager::getRealPath | ( | const std::string & | path | ) |
Definition at line 338 of file resourcemanager.cpp.


|
inline |
| std::string ResourceManager::getUserDir | ( | ) |
|
inline |
|
inline |
| std::string ResourceManager::guessFilePath | ( | const std::string & | filename, |
| const std::string & | type | ||
| ) |
Definition at line 353 of file resourcemanager.cpp.


| void ResourceManager::init | ( | const char * | argv0 | ) |
| bool ResourceManager::isFileType | ( | const std::string & | filename, |
| const std::string & | type | ||
| ) |
Definition at line 360 of file resourcemanager.cpp.


| std::list< std::string > ResourceManager::listDirectoryFiles | ( | const std::string & | directoryPath = "" | ) |
Definition at line 268 of file resourcemanager.cpp.


| bool ResourceManager::makeDir | ( | const std::string | directory | ) |
| FileStreamPtr ResourceManager::openFile | ( | const std::string & | fileName | ) |
Definition at line 232 of file resourcemanager.cpp.


| std::string ResourceManager::readFileContents | ( | const std::string & | fileName | ) |
Definition at line 185 of file resourcemanager.cpp.


| void ResourceManager::readFileStream | ( | const std::string & | fileName, |
| std::iostream & | out | ||
| ) |
Definition at line 173 of file resourcemanager.cpp.


| bool ResourceManager::removeSearchPath | ( | const std::string & | path | ) |
| std::string ResourceManager::resolvePath | ( | const std::string & | path | ) |
Definition at line 312 of file resourcemanager.cpp.


| void ResourceManager::searchAndAddPackages | ( | const std::string & | packagesDir, |
| const std::string & | packageExt | ||
| ) |
Definition at line 144 of file resourcemanager.cpp.


| bool ResourceManager::setupUserWriteDir | ( | const std::string & | appWriteDirName | ) |
Definition at line 70 of file resourcemanager.cpp.


| bool ResourceManager::setWriteDir | ( | const std::string & | writeDir, |
| bool | create = false |
||
| ) |
Definition at line 90 of file resourcemanager.cpp.


| void ResourceManager::terminate | ( | ) |
| bool ResourceManager::writeFileBuffer | ( | const std::string & | fileName, |
| const uchar * | data, | ||
| uint | size | ||
| ) |
Definition at line 201 of file resourcemanager.cpp.


| bool ResourceManager::writeFileContents | ( | const std::string & | fileName, |
| const std::string & | data | ||
| ) |
Definition at line 227 of file resourcemanager.cpp.


| bool ResourceManager::writeFileStream | ( | const std::string & | fileName, |
| std::iostream & | in | ||
| ) |