summaryrefslogtreecommitdiffstats
path: root/src/common/resources/resourcemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/resources/resourcemanager.cpp')
-rw-r--r--src/common/resources/resourcemanager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/resources/resourcemanager.cpp b/src/common/resources/resourcemanager.cpp
index 8119a6b..0741c70 100644
--- a/src/common/resources/resourcemanager.cpp
+++ b/src/common/resources/resourcemanager.cpp
@@ -130,6 +130,21 @@ bool CResourceManager::Exists(const std::string &filename)
return PHYSFS_exists(filename.c_str());
}
+std::vector<std::string> CResourceManager::ListFiles(const std::string &directory)
+{
+ std::vector<std::string> result;
+
+ char **files = PHYSFS_enumerateFiles(directory.c_str());
+
+ for (char **i = files; *i != nullptr; i++) {
+ result.push_back(*i);
+ }
+
+ PHYSFS_freeList(files);
+
+ return result;
+}
+
int CResourceManager::SDLClose(SDL_RWops *context)
{