// Test read file
string fullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("test.txt");
unsigned char* pBuffer = NULL;
unsigned long bufferSize = 0;
pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullPath.c_str(),"r",&bufferSize);
CCLog("bufferSize:%ld",bufferSize);
CCLOG("test.txt : \n %s",pBuffer);
if (pBuffer) {
delete [] pBuffer;
pBuffer = NULL;
}
string fullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("test.txt");
unsigned char* pBuffer = NULL;
unsigned long bufferSize = 0;
pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullPath.c_str(),"r",&bufferSize);
CCLog("bufferSize:%ld",bufferSize);
CCLOG("test.txt : \n %s",pBuffer);
if (pBuffer) {
delete [] pBuffer;
pBuffer = NULL;
}