sqlite3数据库移植到安卓

已经写好的数据库我查了一下感觉在appdelegate里就copy是非常好的主意,参照前辈们的财富写了如下一段
bool AppDelegate::isFileExist(const char* path){
if (!path) return false;
std::string filepath = FileUtils::getInstance()->getWritablePath();
filepath += path;
FILE* pFp = fopen(filepath.c_str(), “r”);
if (pFp){
fclose(pFp);
return true;
}
return false;
}
void AppDelegate::copyData(const char* path){
std::string strPath = FileUtils::getInstance()->fullPathForFilename(path);
ssize_t len;

unsigned char* data = NULL;

data = FileUtils::getInstance()->getFileData(strPath, "r", &len);
std::string destPath = FileUtils::getInstance()->getWritablePath();
destPath += path;

FILE* pFp = fopen(destPath.c_str(), "w+");
fwrite(data, sizeof(char), len, pFp);
fclose(pFp);
delete]data;
data = NULL;

}
这是调用的时候
bool AppDelegate::applicationDidFinishLaunching() {
#if(CC_TARGET_PLATFORM== CC_PLATFORM_ANDROID)
if(isFileExist(“save.db”)==false)
copyData(“save.db”);
#endif
然而还是无法复制到可写路径上 这是怎么回事呢