CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Common/File/VFS/DirectoryReader.h
Views: 1401
1
#pragma once
2
3
#include "Common/File/VFS/VFS.h"
4
#include "Common/File/FileUtil.h"
5
#include "Common/File/Path.h"
6
7
class DirectoryReader : public VFSBackend {
8
public:
9
explicit DirectoryReader(const Path &path);
10
// use delete[] on the returned value.
11
uint8_t *ReadFile(const char *path, size_t *size) override;
12
13
VFSFileReference *GetFile(const char *path) override;
14
bool GetFileInfo(VFSFileReference *vfsReference, File::FileInfo *fileInfo) override;
15
void ReleaseFile(VFSFileReference *vfsReference) override;
16
17
VFSOpenFile *OpenFileForRead(VFSFileReference *vfsReference, size_t *size) override;
18
void Rewind(VFSOpenFile *vfsOpenFile) override;
19
size_t Read(VFSOpenFile *vfsOpenFile, void *buffer, size_t length) override;
20
void CloseFile(VFSOpenFile *vfsOpenFile) override;
21
22
bool GetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter) override;
23
bool GetFileInfo(const char *path, File::FileInfo *info) override;
24
std::string toString() const override {
25
return path_.ToString();
26
}
27
28
private:
29
Path path_;
30
};
31
32