diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-11 19:08:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-11 19:19:38 +0300 |
commit | 245fb04a1e112cc8d0918a8660474299d5ce223c (patch) | |
tree | eb5ab6266a4ff9551d2e08b9c14b61e353cd127f /src/utils/virtfs.cpp | |
parent | f978c1bed85961e102951340669ca873328bcef3 (diff) | |
download | plus-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.gz plus-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.bz2 plus-245fb04a1e112cc8d0918a8660474299d5ce223c.tar.xz plus-245fb04a1e112cc8d0918a8660474299d5ce223c.zip |
Split virtfs api for add directories and archives.
Also remove useless resourcemanager functions for add/remove virtfs entries.
Diffstat (limited to 'src/utils/virtfs.cpp')
-rw-r--r-- | src/utils/virtfs.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/utils/virtfs.cpp b/src/utils/virtfs.cpp index 6d3d18ba9..ef70d119e 100644 --- a/src/utils/virtfs.cpp +++ b/src/utils/virtfs.cpp @@ -136,14 +136,28 @@ namespace VirtFs return PHYSFS_setWriteDir(newDir); } - bool addToSearchPath(const char *const newDir, const int appendToPath) + bool addDirToSearchPath(const std::string &newDir, + const Append append) { - return PHYSFS_addToSearchPath(newDir, appendToPath); + return PHYSFS_addToSearchPath(newDir.c_str(), + append == Append_true ? 1 : 0); } - bool removeFromSearchPath(const char *const oldDir) + bool removeDirFromSearchPath(const std::string &oldDir) { - return PHYSFS_removeFromSearchPath(oldDir); + return PHYSFS_removeFromSearchPath(oldDir.c_str()); + } + + bool addZipToSearchPath(const std::string &newDir, + const Append append) + { + return PHYSFS_addToSearchPath(newDir.c_str(), + append == Append_true ? 1 : 0); + } + + bool removeZipFromSearchPath(const std::string &oldDir) + { + return PHYSFS_removeFromSearchPath(oldDir.c_str()); } const char *getRealDir(const char *const filename) |