MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / getAppDirectory

Function getAppDirectory

KittyMemoryEx/KittyMemoryEx.cpp:381–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379
380#ifdef __ANDROID__
381 std::string getAppDirectory(const std::string &pkg)
382 {
383 std::string directory = "/data/app/", base_apk = "base.apk", ret;
384 KittyIOFile::listFilesCallback(directory, [&](const std::string &filePath) {
385 if (KittyUtils::Path::fileName(filePath) == base_apk)
386 {
387 const std::string fileDir = KittyUtils::Path::fileDirectory(filePath);
388 if (strstr(fileDir.c_str(), pkg.c_str()))
389 {
390 ret = fileDir;
391 return true;
392 }
393 }
394 return false;
395 });
396 return ret;
397 }
398#endif
399
400} // namespace KittyMemoryEx

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected