diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-15 20:10:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-15 20:10:42 +0300 |
commit | 3d4ec0e043e9a683257757d3e84bec6798ff210d (patch) | |
tree | e4d7c597c49fa0f64682819ecb023339f85b1326 /src/fs/virtfs/fs.h | |
parent | f237697b267f10dc8b2b6b45f1f539c58f3ff435 (diff) | |
download | manaverse-3d4ec0e043e9a683257757d3e84bec6798ff210d.tar.gz manaverse-3d4ec0e043e9a683257757d3e84bec6798ff210d.tar.bz2 manaverse-3d4ec0e043e9a683257757d3e84bec6798ff210d.tar.xz manaverse-3d4ec0e043e9a683257757d3e84bec6798ff210d.zip |
Add subdir parameter into mountDir functions.
Diffstat (limited to 'src/fs/virtfs/fs.h')
-rw-r--r-- | src/fs/virtfs/fs.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/fs/virtfs/fs.h b/src/fs/virtfs/fs.h index a6b787d6e..f8950723d 100644 --- a/src/fs/virtfs/fs.h +++ b/src/fs/virtfs/fs.h @@ -51,10 +51,20 @@ namespace VirtFs bool setWriteDir(const std::string &restrict newDir); bool mountDir(std::string newDir, const Append append); + bool mountDir2(std::string newDir, + std::string subDir, + const Append append); bool mountDirSilent(std::string newDir, const Append append); + bool mountDirSilent2(std::string newDir, + std::string subDir, + const Append append); bool unmountDir(std::string oldDir); + bool unmountDir2(std::string oldDir, + std::string subDir); bool unmountDirSilent(std::string oldDir); + bool unmountDirSilent2(std::string oldDir, + std::string subDir); bool mountZip(std::string newDir, const Append append); bool unmountZip(std::string oldDir); @@ -79,18 +89,23 @@ namespace VirtFs int eof(File *restrict const file); bool mountDirInternal(const std::string &restrict newDir, + const std::string &restrict subDir, const Append append); - bool unmountDirInternal(std::string oldDir); + bool unmountDirInternal(std::string oldDir, + const std::string &restrict subDir); std::vector<FsEntry*> &getEntries(); - FsEntry *searchEntryByRootInternal(const std::string &restrict - root); - FsEntry *searchEntryInternal(const std::string &restrict root, - const FsEntryTypeT type); + FsEntry *searchByRootInternal(const std::string &restrict root, + const std::string &restrict subDir); + FsEntry *searchByTypeInternal(const std::string &restrict root, + const FsEntryTypeT type); void addEntry(FsEntry *const entry, const Append append); #ifdef UNITTESTS - bool mountDirSilent2(std::string newDir, - const Append append); + bool mountDirSilentTest(std::string newDir, + const Append append); + bool mountDirSilentTest2(std::string newDir, + std::string subDir, + const Append append); #endif // UNITTESTS const char *loadFile(std::string filename, int &restrict fileSize); |