mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "Common/File/VFS/VFS.h"
|
|
#include "Common/File/FileUtil.h"
|
|
#include "Common/File/Path.h"
|
|
|
|
class DirectoryReader : public VFSBackend {
|
|
public:
|
|
explicit DirectoryReader(const Path &path);
|
|
// use delete[] on the returned value.
|
|
uint8_t *ReadFile(const char *path, size_t *size) override;
|
|
|
|
VFSFileReference *GetFile(const char *path) override;
|
|
bool GetFileInfo(VFSFileReference *vfsReference, File::FileInfo *fileInfo) override;
|
|
void ReleaseFile(VFSFileReference *vfsReference) override;
|
|
|
|
VFSOpenFile *OpenFileForRead(VFSFileReference *vfsReference, size_t *size) override;
|
|
void Rewind(VFSOpenFile *vfsOpenFile) override;
|
|
size_t Read(VFSOpenFile *vfsOpenFile, void *buffer, size_t length) override;
|
|
void CloseFile(VFSOpenFile *vfsOpenFile) override;
|
|
|
|
bool GetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter) override;
|
|
bool GetFileInfo(const char *path, File::FileInfo *info) override;
|
|
bool Exists(const char *path) override;
|
|
std::string toString() const override {
|
|
return path_.ToString();
|
|
}
|
|
|
|
private:
|
|
Path path_;
|
|
};
|