diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-23 01:06:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-23 01:06:11 +0300 |
commit | 2b6106c41f3959d4deb8efc58c9055de0339959e (patch) | |
tree | 2ae271cd59997d4fe128e0173c0224e28417b34b /src/fs/virtfstools.cpp | |
parent | 76667ef0fa911fc8bf37df72896645dbfbbc0763 (diff) | |
download | manaverse-2b6106c41f3959d4deb8efc58c9055de0339959e.tar.gz manaverse-2b6106c41f3959d4deb8efc58c9055de0339959e.tar.bz2 manaverse-2b6106c41f3959d4deb8efc58c9055de0339959e.tar.xz manaverse-2b6106c41f3959d4deb8efc58c9055de0339959e.zip |
Impliment basic VirtFsDir for virtual fs based on directories.
Api similar to VirtFs.
VirtFsDir unused for now.
Diffstat (limited to 'src/fs/virtfstools.cpp')
-rw-r--r-- | src/fs/virtfstools.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fs/virtfstools.cpp b/src/fs/virtfstools.cpp index 889739658..d227f5f07 100644 --- a/src/fs/virtfstools.cpp +++ b/src/fs/virtfstools.cpp @@ -24,6 +24,7 @@ #include "fs/paths.h" #include "fs/virtfs.h" +#include "fs/virtfsdir.h" #include "fs/virtlist.h" #include "utils/stringutils.h" @@ -221,3 +222,19 @@ namespace VirtFs return true; } } // namespace VirtFs + +// +++ temporary add it here +namespace VirtFsDir +{ + void getFiles(const std::string &path, + StringVect &list) + { + VirtList *const fonts = VirtFsDir::enumerateFiles(path); + FOR_EACH (StringVectCIter, i, fonts->names) + { + if (!VirtFsDir::isDirectory(path + dirSeparator + *i)) + list.push_back(*i); + } + VirtFsDir::freeList(fonts); + } +} // namespace VirtFs |