Path to assets in Android Used to reach a specific location.
More...
#include <asset.h>
|
AAssetManager * | manager |
|
std::vector< AAssetDir * > | path |
|
Path to assets in Android Used to reach a specific location.
Definition at line 34 of file asset.h.
◆ AssetPath()
AssetPath::AssetPath |
( |
AAssetManager * |
manager, |
|
|
const char * |
path = "" |
|
) |
| |
Definition at line 25 of file asset.cpp.
void follow(const char *path)
◆ ~AssetPath()
AssetPath::~AssetPath |
( |
| ) |
|
Definition at line 29 of file asset.cpp.
30 for (
auto _ =
path.rbegin(); _ !=
path.rend(); ++_) {
std::vector< AAssetDir * > path
◆ follow()
void AssetPath::follow |
( |
const char * |
path | ) |
|
Definition at line 35 of file asset.cpp.
37 std::string
path(path_);
40 if (i == std::string::npos)
41 i =
path.length() + 1;
42 std::string dir(
path.substr(pos, i - pos - 1));
46 this->
path.push_back( AAssetManager_openDir(
manager, dir.c_str()) );
48 }
while (pos <
path.length());
static const char PATH_DELIMITER
bool up()
Goes one level up ("..") from the current asset folder.
◆ up()
Goes one level up ("..") from the current asset folder.
Definition at line 64 of file asset.cpp.
67 AAssetDir_close(
path.back());
◆ listFiles()
msize AssetPath::listFiles |
( |
std::vector< std::string > & |
files | ) |
|
Lists files in the current folder.
- Parameters
-
[out] | files | A list of strings the names of files in the current folder are appended to |
- Returns
- number of files in the current folder.
Definition at line 51 of file asset.cpp.
56 while ((
filename = AAssetDir_getNextFileName(
path.back()) ) !=
nullptr) {
60 AAssetDir_rewind(
path.back());
uint32_t msize
memory size
JNIEnv jlong jstring filename
◆ manager
AAssetManager* Beatmup::Android::AssetPath::manager |
|
private |
◆ path
std::vector<AAssetDir*> Beatmup::Android::AssetPath::path |
|
private |
◆ PATH_DELIMITER
const char Beatmup::Android::AssetPath::PATH_DELIMITER = '/' |
|
static |
The documentation for this class was generated from the following files: