Moved ScanDirectoryTree() to FileUtil: this is a generic directory scanning function which might be useful in other places as well.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@650 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne
2008-09-23 23:27:38 +00:00
parent c688f95374
commit 35d830924d
4 changed files with 92 additions and 96 deletions

View File

@ -19,12 +19,22 @@
#define _FILEUTIL_H
#include <string>
#include <vector>
#include "Common.h"
namespace File
{
struct FSTEntry
{
bool isDirectory;
u32 size; // file length or number of entries from children
std::string physicalName; // name on disk
std::string virtualName; // name in FST names table
std::vector<FSTEntry> children;
};
bool Exists(const char *filename);
void Launch(const char *filename);
void Explore(const char *path);
@ -34,6 +44,8 @@ bool Delete(const char *filename);
u64 GetSize(const char *filename);
std::string GetUserDirectory();
u32 ScanDirectoryTree(const std::string& _Directory, FSTEntry& parentEntry);
} // namespace
#endif