/ Published in: Objective C
Delete the files in Documents folder if it's not a sqlite file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
- (void)deleteFilesFromDocuments { BOOL res; NSString* file; while (file = [en nextObject]) { if ([file rangeOfString:@".sqlite"].location == NSNotFound) { res = [fm removeItemAtPath:[path stringByAppendingPathComponent:file] error:&err]; if (!res && err) { NSLog(@"oops: %@", err); } } } }