summaryrefslogtreecommitdiff
path: root/src/fs/virtfstools.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-27 16:17:39 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-27 16:17:39 +0300
commit757069bdedabbd904e56d153e2e858db2a2cf2f1 (patch)
treea89504b98b5df8973fbb8697e25cbccfb0ccff33 /src/fs/virtfstools.cpp
parent87ed78002ec488b2983dcf47b8b01d49f432e13b (diff)
downloadmv-757069bdedabbd904e56d153e2e858db2a2cf2f1.tar.gz
mv-757069bdedabbd904e56d153e2e858db2a2cf2f1.tar.bz2
mv-757069bdedabbd904e56d153e2e858db2a2cf2f1.tar.xz
mv-757069bdedabbd904e56d153e2e858db2a2cf2f1.zip
Move physfs related functions into virtfsphys file.
Diffstat (limited to 'src/fs/virtfstools.cpp')
-rw-r--r--src/fs/virtfstools.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/fs/virtfstools.cpp b/src/fs/virtfstools.cpp
index d227f5f07..c9e976864 100644
--- a/src/fs/virtfstools.cpp
+++ b/src/fs/virtfstools.cpp
@@ -25,6 +25,7 @@
#include "fs/paths.h"
#include "fs/virtfs.h"
#include "fs/virtfsdir.h"
+#include "fs/virtfsphys.h"
#include "fs/virtlist.h"
#include "utils/stringutils.h"
@@ -238,3 +239,19 @@ namespace VirtFsDir
VirtFsDir::freeList(fonts);
}
} // namespace VirtFs
+
+// +++ temporary add it here
+namespace VirtFsPhys
+{
+ void getFiles(const std::string &path,
+ StringVect &list)
+ {
+ VirtList *const fonts = VirtFsPhys::enumerateFiles(path);
+ FOR_EACH (StringVectCIter, i, fonts->names)
+ {
+ if (!VirtFsPhys::isDirectory(path + dirSeparator + *i))
+ list.push_back(*i);
+ }
+ VirtFsPhys::freeList(fonts);
+ }
+} // namespace VirtFs