ios - itunes file share restore deleted files -
my app uses itunes file share. used code delete single file: worked first time. on second try, however, itunes showed empty share directory. turns out data files gone. can recover data files ipad? thanks
- (void) deletefilefromdisk: (nsstring*) filename { if([self fileexists: filename]) { nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) ; nsstring *documentsdirectory = [paths objectatindex: 0]; nsstring* thefile = [documentsdirectory stringbyappendingpathcomponent: filename]; nserror *error; [[nsfilemanager defaultmanager] removeitematpath: thefile error: &error];
there's no "restore" feature on ipad. in probability there's nothing worry about.
there's nothing code delete multiple files. delete file documents directory supplied name of filename
. if didn't call deletefilefromdisk:
multiple times, didn't delete multiple files.
perhaps @ point deleted app. delete entire sandbox , take in documents directory. sort of thing normal during repeated testing.
Comments
Post a Comment