Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
- NSArray *documents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:basePath error:nil];
- NSURL *URL;
- NSString *completeFilePath;
- for (NSString *file in documents) {
- completeFilePath = [NSString stringWithFormat:@"%@/%@", basePath, file];
- URL = [NSURL fileURLWithPath:completeFilePath];
- NSLog(@"File %@ is excluded from backup %@", file, [URL resourceValuesForKeys:[NSArray arrayWithObject:NSURLIsExcludedFromBackupKey] error:nil]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement