void getSystemFileList(VectorFileInfo& _result, const std::string& _folder, const std::string& _mask)
	{
		const std::vector<std::string>& paths = CCFileUtils::sharedFileUtils()->getSearchPaths();

		for (unsigned i = 0; i < paths.size(); ++i)
		{
			if (paths[i][0] == '/')
			{
				getFileListFromSys(_result, paths[i] + _folder, _mask);
			}
			else
			{
				getFileListFromZip(_result, getApkPath(), paths[i] + _folder, _mask);
			}
		}
	}
示例#2
0
void Recipe76::doStep3()
{
#if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID)
    CCMessageBox("Android Only", "RecipeBook");
    return;
#else
    unsigned long size;
    unsigned char *data;
    std::string filename = "res/drawable-mdpi/icon.png";
    std::string apkPath = getApkPath();
    CCFileUtils* fileUtils = CCFileUtils::sharedFileUtils();
    data = fileUtils->getFileDataFromZip(apkPath.c_str(),
                                         filename.c_str(), &size);
    if (data!=NULL)
    {
        // icon データ参照
        CCLabelTTF *label = (CCLabelTTF*)this->getChildByTag(10);
        label->setString("apk からアイコンデータを取得しました");
        delete [] data;
    }
#endif
}