nsarray *cachepath= nssearchpathfordirectoriesindomains(nscachesdirectory, nsuserdomainmask, yes);
nsstring *cachedir = [cachepath objectatindex:0];
nsstring *filepath = [cachedir stringbyappendingpathcomponent:@"version.plist"];
nsfilemanager *filemanager = [nsfilemanager defaultmanager];
// copy the file from the resourcepath to the documentpath
if (![filemanager fileexistsatpath:filepath]) {
nsstring *databasepathfromapp = [[[nsbundle mainbundle] resourcepath] stringbyappendingpathcomponent:@"version.plist"];
nserror *error;
[filemanager copyitematpath:databasepathfromapp topath:filepath error:&error];
}
nsdictionary *dic=[nsmutabledictionary dictionarywithcontentsoffile:filepath];
如对本文有疑问, 点击进行留言回复!!
Codeforces Round #657 (Div. 2) C题
hdu2222 Keywords Search(ac自动机模板-kuangbin)
IOS开发控件视图day08:监听文本框状态设置按钮状态不可点击且变灰
网友评论