Includes or excludes an item from the backup.
- macOS 10.5+
- Core Services
The URL of the file or folder to be included or excluded from the backup.
trueto exclude this item from backup (Backup will not back up this item). Pass
falseto stop excluding this item (Backup will back up this item if the user so chooses).
trueto indicate that this item is excluded because of its location (its absolute path). Pass
falseto indicate that this item is excluded regardless of its location (and regardless of whether the user moves the item).
A result code. Returns
no if the item was successfully included or excluded from the backup.
Backup skips files and folders marked for exclusion. If a folder is marked for exclusion, the folder and all its contents are excluded from the backup process. You can exclude specific paths that do not exist yet, but that you plan to create later, by passing the planned URL in
item and passing
exclude. Note that if you pass
exclude, the URL must already exist.
Your application can allow users to change the backup exclusion status of any file or folder to which it has write access. To change the backup exclusion status of a path, your application must be running with administrator privileges.