My application has two sources of data: standard assets folder and downloaded file. Now I access assets (from C++ code) using AAssetManager_open
, AAsset_read
etc. And I read data from downloaded file using good old fopen
, fread
etc. Is it possible to access all the data in unified way using fopen
, fread
stuff? In other words, can I change
AAssetManager* assetManager = g_state->activity->assetManager;
AAsset* asset = AAssetManager_open(assetManager, filename, AASSET_MODE_UNKNOWN);
int ret = AAsset_read(asset, buf, size);
to
char *filenameFull = SomehowGetFullPathToAssetsFile(filename);
FILE *fp = fopen(filenameFull, "rb");
int ret = fread(buf, size, 1, fp);