summaryrefslogtreecommitdiff
path: root/src/fs/physfs/virtfsphys.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-09 03:31:42 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-09 03:31:42 +0300
commit612873fa462d74a31bdd3977dac7919376038275 (patch)
tree86c7ce3cb5a0d334bcba5d463846a88e03a8669e /src/fs/physfs/virtfsphys.cpp
parent8470d3c82d84a6bd7767de6763153aa9cdfb991b (diff)
downloadplus-612873fa462d74a31bdd3977dac7919376038275.tar.gz
plus-612873fa462d74a31bdd3977dac7919376038275.tar.bz2
plus-612873fa462d74a31bdd3977dac7919376038275.tar.xz
plus-612873fa462d74a31bdd3977dac7919376038275.zip
Simplify add/remove dirs and zips methods in virtfs.
Diffstat (limited to 'src/fs/physfs/virtfsphys.cpp')
-rw-r--r--src/fs/physfs/virtfsphys.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/fs/physfs/virtfsphys.cpp b/src/fs/physfs/virtfsphys.cpp
index 439ed2890..f6d0abf47 100644
--- a/src/fs/physfs/virtfsphys.cpp
+++ b/src/fs/physfs/virtfsphys.cpp
@@ -180,73 +180,73 @@ namespace VirtFsPhys
return PHYSFS_setWriteDir(newDir.c_str());
}
- bool addDirToSearchPath(const std::string &restrict newDir,
- const Append append)
+ bool mountDir(const std::string &restrict newDir,
+ const Append append)
{
logger->log("Add virtual directory: " + newDir);
if (newDir.find(".zip") != std::string::npos)
{
- reportAlways("Called addDirToSearchPath with zip archive");
+ reportAlways("Called mountDir with zip archive");
return false;
}
const int ret = PHYSFS_addToSearchPath(newDir.c_str(),
append == Append_true ? 1 : 0);
if (ret == 0)
{
- logger->log("addDirToSearchPath error: %s",
+ logger->log("mountDir error: %s",
VirtFsPhys::getLastError());
}
return ret;
}
- bool removeDirFromSearchPath(const std::string &restrict oldDir)
+ bool unmountDir(const std::string &restrict oldDir)
{
logger->log("Remove virtual directory: " + oldDir);
if (oldDir.find(".zip") != std::string::npos)
{
- reportAlways("Called removeDirFromSearchPath with zip archive");
+ reportAlways("Called unmountDir with zip archive");
return false;
}
const int ret = PHYSFS_removeFromSearchPath(oldDir.c_str());
if (ret == 0)
{
- logger->log("removeDirFromSearchPath error: %s",
+ logger->log("unmountDir error: %s",
VirtFsPhys::getLastError());
}
return ret;
}
- bool addZipToSearchPath(const std::string &restrict newDir,
- const Append append)
+ bool mountZip(const std::string &restrict newDir,
+ const Append append)
{
logger->log("Add virtual zip: " + newDir);
if (newDir.find(".zip") == std::string::npos)
{
- reportAlways("Called addZipToSearchPath without zip archive");
+ reportAlways("Called mountZip without zip archive");
return false;
}
const int ret = PHYSFS_addToSearchPath(newDir.c_str(),
append == Append_true ? 1 : 0);
if (ret == 0)
{
- logger->log("addZipToSearchPath error: %s",
+ logger->log("mountZip error: %s",
VirtFsPhys::getLastError());
}
return ret;
}
- bool removeZipFromSearchPath(const std::string &restrict oldDir)
+ bool unmountZip(const std::string &restrict oldDir)
{
logger->log("Remove virtual zip: " + oldDir);
if (oldDir.find(".zip") == std::string::npos)
{
- reportAlways("Called removeZipFromSearchPath without zip archive");
+ reportAlways("Called unmountZip without zip archive");
return false;
}
const int ret = PHYSFS_removeFromSearchPath(oldDir.c_str());
if (ret == 0)
{
- logger->log("removeZipFromSearchPath error: %s",
+ logger->log("unmountZip error: %s",
VirtFsPhys::getLastError());
}
return ret;