summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs/virtfs.cpp')
-rw-r--r--src/fs/virtfs/virtfs.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp
index d9423f66e..e61069301 100644
--- a/src/fs/virtfs/virtfs.cpp
+++ b/src/fs/virtfs/virtfs.cpp
@@ -161,6 +161,28 @@ namespace VirtFs
return list;
}
+ void getFiles(std::string dirName,
+ StringVect &list)
+ {
+ prepareFsPath(dirName);
+ if (checkPath(dirName) == false)
+ {
+ reportAlways("VirtFs::enumerateFiles invalid path: %s",
+ dirName.c_str());
+ return;
+ }
+
+ std::string rootDir = dirName;
+ if (findLast(rootDir, std::string(dirSeparator)) == false)
+ rootDir += dirSeparator;
+
+ FOR_EACH (std::vector<VirtFsEntry*>::const_iterator, it, mEntries)
+ {
+ VirtFsEntry *const entry = *it;
+ entry->funcs->getFiles(entry, rootDir, list);
+ }
+ }
+
bool isDirectory(std::string name)
{
prepareFsPath(name);