iOS Guides | Samples

MonoTouch.Foundation.NSFileManager.SetSkipBackupAttribute Method

Syntax

public static NSError SetSkipBackupAttribute (String filename, Boolean skipBackup)

Parameters

filename
Path of file
skipBackup
True if you want to flag this file to be skipped for backups or false if you want to have this file backed up to iCloud.

Returns

A null return value will indicate success, while a non-null error will contain an instance of NSError detailing the problem

Remarks

If you set the SkipBackup attribute on a file, it will inform the operating system that this file should not be backed up into iCloud. This high-level API automagically adjust itself based on the version of iOS being executed. On iOS 5.0.1 (only) it will use the old setxattr API to set (or remove) the "com.apple.MobileBackup" attribute. On iOS 5.1 (and later) it will use NSUrlIsExcludedFromBackupKey to accomplish the same.

Requirements

Namespace: MonoTouch.Foundation
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0