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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/files.cpp b/src/utils/files.cpp
index 72a4b2cb5..9abf13593 100644
--- a/src/utils/files.cpp
+++ b/src/utils/files.cpp
@@ -207,3 +207,14 @@ void Files::getFiles(const std::string &path, StringVect &list)
}
PhysFs::freeList(fonts);
}
+
+void Files::getFilesWithDir(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(path + *i);
+ }
+ PhysFs::freeList(fonts);
+}