willUnmountNotification
A notification that the workspace posts when the Finder is about to unmount a device.
Declaration
class let willUnmountNotification: NSNotification.NameDiscussion
This notification doesn’t post if a volume becomes forcibly and immediately unavailable, such as when simply unplugging a drive.
The notification object is the shared NSWorkspace instance. The userInfo dictionary contains a key @"NSDevicePath" that returns the path where the device mounts as a string.
See Also
Responding to Environment Notifications
willLaunchApplicationNotificationdidLaunchApplicationNotificationdidTerminateApplicationNotificationsessionDidBecomeActiveNotificationsessionDidResignActiveNotificationdidHideApplicationNotificationdidUnhideApplicationNotificationdidActivateApplicationNotificationdidDeactivateApplicationNotificationdidRenameVolumeNotificationdidMountNotificationdidUnmountNotificationdidChangeFileLabelsNotificationactiveSpaceDidChangeNotificationdidWakeNotification