2012-11-27 15:38:24 +00:00
|
|
|
#pragma once
|
2012-03-24 22:39:19 +00:00
|
|
|
|
2020-09-29 10:44:47 +00:00
|
|
|
#include <vector>
|
2020-10-04 18:48:47 +00:00
|
|
|
|
|
|
|
#include "Common/File/DirListing.h"
|
2020-09-29 10:44:47 +00:00
|
|
|
|
2012-03-31 09:16:13 +00:00
|
|
|
// Basic virtual file system. Used to manage assets on Android, where we have to
|
|
|
|
// read them manually out of the APK zipfile, while being able to run on other
|
|
|
|
// platforms as well with the appropriate directory set-up.
|
|
|
|
|
2012-03-24 22:39:19 +00:00
|
|
|
class AssetReader;
|
|
|
|
|
|
|
|
void VFSRegister(const char *prefix, AssetReader *reader);
|
|
|
|
void VFSShutdown();
|
|
|
|
|
2012-03-31 09:16:13 +00:00
|
|
|
// Use delete [] to release the returned memory.
|
|
|
|
// Always allocates an extra zero byte at the end, so that it
|
2012-03-24 22:39:19 +00:00
|
|
|
// can be used for text like shader sources.
|
|
|
|
uint8_t *VFSReadFile(const char *filename, size_t *size);
|
2021-04-25 18:38:22 +00:00
|
|
|
bool VFSGetFileListing(const char *path, std::vector<File::FileInfo> *listing, const char *filter = 0);
|
|
|
|
bool VFSGetFileInfo(const char *filename, File::FileInfo *fileInfo);
|