userDBName = FileUtils::getInstance()->fullPathForFilename("USER.db");
gameDBName = FileUtils::getInstance()->fullPathForFilename("GAME.db");
std::string writepath = FileUtils::getInstance()->getWritablePath();
std::string uspa = writepath+"USER.db";
FILE* file = fopen(uspa.c_str(), "r");
if (file == nullptr) {//!FileUtils::getInstance()->isFileExist(uspa)
FILE* openfile = fopen(uspa.c_str(), "wb");
ssize_t size;
auto data = (char*)FileUtils::getInstance()->getFileData("USER.db","rb",&size);
fwrite(data, size, 1, openfile);
CC_SAFE_DELETE_ARRAY(data);
fclose(openfile);
}
userDBName = uspa.c_str();
fclose(file);