I have a bunch of plist files in the assets/plist/ folder and I am trying to load these files to validate their hashes.
what happens is that the following code fails for me
const char *fullPath = cocos2d::CCFileUtils::sharedFileUtils()->fullPathForFilename(name).c_str();
std::ifstream ifs(fullPath, std::ios::binary);
std::vector<char> str((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
The returned char array is always empty.
Trying to open the same file with fopen also results in a null pointer for the file handle.
I have verified that the full path is assets/plists/file.plist
and that the file.plist
exists in the assets/plist
folder.
What am I doing wrong here?