About Disk Arbitration
The Disk Arbitration framework notifies your app when disks appear and disappear and lets your app influence that process. With Disk Arbitration, your app can:
Detect when new disks appear
Prevent mounting
Mount a volume with different flags or on a different mount point
Unmount a volume
Watch for changes in volume names
Disk Arbitration is a low-level framework based on Core Foundation.
You should read this document if you need to handle unknown media, disable the normal mount process for certain devices, or otherwise monitor or manipulate the mounting or unmounting of volumes.
At a Glance
At a high level, you can use the Disk Arbitration framework to:
Receive notification of disk-related events (disk ejection, for example) and participate in the arbitration process (preventing disk ejection, for example).
Obtain information about disks and manipulate disks (requesting that a disk be ejected, for example).
Working with Disk Arbitration Session Objects
With session objects, you can receive notification when a disk appears, a mount or unmount occurs, or a disk disappears. You can also register an approval callback to block those operations.
For example, your app might register for notification when a disk appears, and if the disk matches a specific GUID, it might automatically make a backup copy of specific files on that external disk.
Working with Disk Objects
A disk object represents a particular disk or partition. You can eject it, obtain information about it, or mount and unmount the associated volume or volumes. But first, you must obtain an object corresponding to a particular disk.
Copyright © 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-09-17