Created
February 6, 2016 10:47
-
-
Save maximbilan/18a23acb854c003280e9 to your computer and use it in GitHub Desktop.
iCloud Issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment