|
@@ -530,6 +530,19 @@
|
|
|
#pragma mark ===== Various =====
|
|
|
#pragma --------------------------------------------------------------------------------------------
|
|
|
|
|
|
++ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
|
|
|
+{
|
|
|
+ assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
|
|
|
+
|
|
|
+ NSError *error = nil;
|
|
|
+ BOOL success = [URL setResourceValue:[NSNumber numberWithBool: YES] forKey: NSURLIsExcludedFromBackupKey error: &error];
|
|
|
+ if(!success){
|
|
|
+ NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
|
|
|
+ }
|
|
|
+
|
|
|
+ return success;
|
|
|
+}
|
|
|
+
|
|
|
+ (NSString *)getUserAgent
|
|
|
{
|
|
|
NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
|