diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-04 00:27:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-04 01:12:19 +0300 |
commit | 79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00 (patch) | |
tree | f9669ee10e2ea3f2c41abaa84830da9efe7f9411 /src/fs/virtfsfuncs.h | |
parent | a6c70dd1f32c38cc81cfd4b28f929d7c13d86db1 (diff) | |
download | manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.gz manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.bz2 manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.tar.xz manaverse-79bb654b80d5eb7a65814f80b9ca7ca1ccd62a00.zip |
Reimplement VirtFs in correct way. Now all tests should pass.
Diffstat (limited to 'src/fs/virtfsfuncs.h')
-rw-r--r-- | src/fs/virtfsfuncs.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/fs/virtfsfuncs.h b/src/fs/virtfsfuncs.h index fee057944..b78643f7f 100644 --- a/src/fs/virtfsfuncs.h +++ b/src/fs/virtfsfuncs.h @@ -23,11 +23,14 @@ #include "enums/simpletypes/append.h" -#include "localconsts.h" +#include "utils/stringvector.h" -#include <string> +#include "localconsts.h" struct VirtFile; +#ifndef USE_PHYSFS +struct VirtFsEntry; +#endif // USE_PHYSFS struct VirtFsFuncs final { @@ -58,6 +61,27 @@ struct VirtFsFuncs final int (*seek) (VirtFile *restrict const file, const uint64_t pos); int (*eof) (VirtFile *restrict const file); +#ifndef USE_PHYSFS + bool (*exists) (VirtFsEntry *restrict const entry, + const std::string &filename, + const std::string &dirName); + bool (*getRealDir) (VirtFsEntry *restrict const entry, + const std::string &filename, + const std::string &dirName, + std::string &realDir); + void (*enumerate) (VirtFsEntry *restrict const entry, + const std::string &dirName, + StringVect &names); + bool (*isDirectory) (VirtFsEntry *restrict const entry, + const std::string &dirName, + bool &isDirFlag); + VirtFile *(*openRead) (VirtFsEntry *restrict const entry, + const std::string &filename); + VirtFile *(*openWrite) (VirtFsEntry *restrict const entry, + const std::string &filename); + VirtFile *(*openAppend) (VirtFsEntry *restrict const entry, + const std::string &filename); +#endif // USE_PHYSFS }; #endif // UTILS_VIRTFSFUNCS_H |