Add a way to restrict ISO reading to a single path.

This is for GameInfoCache.
This commit is contained in:
Unknown W. Brackets committed 2013-03-31 21:36:12 -07:00
1 parent 20bb55e1cb
commit d11a5debcb
3 files changed
+32 -8

No files matched your search

+6 -2
View File
@@ -20,6 +20,7 @@
#include <map>
#include <string>
#include <list>
#include <vector>
#include "FileSystem.h"
@@ -29,7 +30,7 @@
class ISOFileSystem : public IFileSystem
{
public:
ISOFileSystem(IHandleAllocator *_hAlloc, BlockDevice *_blockDevice);
ISOFileSystem(IHandleAllocator *_hAlloc, BlockDevice *_blockDevice, std::string _restrictPath = "");
~ISOFileSystem();
void DoState(PointerWrap &p);
std::vector<PSPFileInfo> GetDirListing(std::string path);
@@ -87,7 +88,10 @@ private:
TreeEntry entireISO;
void ReadDirectory(u32 startsector, u32 dirsize, TreeEntry *root);
// Don't use this in the emu, not savestated.
std::vector<std::string> restrictTree;
void ReadDirectory(u32 startsector, u32 dirsize, TreeEntry *root, size_t level);
TreeEntry *GetFromPath(std::string path, bool catchError=true);
std::string EntryFullPath(TreeEntry *e);