summaryrefslogtreecommitdiff
path: root/src/utils/files.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/files.cpp')
-rw-r--r--src/utils/files.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp
index 206a4d4bd..72a4b2cb5 100644
--- a/src/utils/files.cpp
+++ b/src/utils/files.cpp
@@ -22,10 +22,10 @@
#if defined(ANDROID) || defined(__native_client__)
#include "resources/resourcemanager.h"
-#include "utils/physfstools.h"
#endif
#include "utils/mkdir.h"
+#include "utils/physfstools.h"
#include "localconsts.h"
@@ -196,3 +196,14 @@ int Files::copyFile(const std::string &restrict srcName,
fclose(dstFile);
return 0;
}
+
+void Files::getFiles(const std::string &path, StringVect &list)
+{
+ char **fonts = PhysFs::enumerateFiles(path.c_str());
+ for (char **i = fonts; *i; i++)
+ {
+ if (!PhysFs::isDirectory((path + *i).c_str()))
+ list.push_back(*i);
+ }
+ PhysFs::freeList(fonts);
+}