unmountAndEjectDevice(atPath:)
Unmounts and ejects the device at the specified path.
Declaration
func unmountAndEjectDevice(atPath path: String) -> BoolParameters
- path:
The path to the device.
Return Value
Discussion
When this method begins, it posts an willUnmountNotification to the NSWorkspace object’s notification center. When it is finished, it posts an didUnmountNotification.
Prefer the unmountAndEjectDevice(at:) method because it provides more detailed error information.
You can safely call this method from any thread of your app.