21 #include "../input_stream.h"
22 #include "../chunkfile.h"
23 #include <android/asset_manager.h>
37 std::vector<AAssetDir*>
path;
68 Asset(AAssetManager* manager,
const char* path);
Path to assets in Android Used to reach a specific location.
static const char PATH_DELIMITER
AssetPath(AAssetManager *manager, const char *path="")
bool up()
Goes one level up ("..") from the current asset folder.
std::vector< AAssetDir * > path
void follow(const char *path)
msize listFiles(std::vector< std::string > &files)
Lists files in the current folder.
bool eof() const
Returns true, if the end of the stream is reached (i.e., all the data is read or the stream is empty)...
bool operator()(void *buffer, msize bytes)
Reads a given number of bytes into a specific memory location.
bool seek(msize pos)
Moves the read pointer to a given position in the stream.
Asset(AAssetManager *manager, const char *path)
void open()
Opens the collection to read chunks from it.
void close()
Closes the collection after a reading session.
ChunkAsset(AAssetManager *manager, const std::string &filename)
Creates a read-only chunk collection from an asset.
uint32_t msize
memory size
JNIEnv jlong jstring filename