Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  2. NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
  3. NSArray *documents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:basePath error:nil];
  4. NSURL *URL;
  5. NSString *completeFilePath;
  6. for (NSString *file in documents) {
  7. completeFilePath = [NSString stringWithFormat:@"%@/%@", basePath, file];
  8. URL = [NSURL fileURLWithPath:completeFilePath];
  9. NSLog(@"File %@ is excluded from backup %@", file, [URL resourceValuesForKeys:[NSArray arrayWithObject:NSURLIsExcludedFromBackupKey] error:nil]);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement