Instance Method

unmountAndEjectDeviceAtPath:

Unmounts and ejects the device at the specified path.

Declaration

- (BOOL)unmountAndEjectDeviceAtPath:(NSString *)path;

Parameters

path

The path to the device.

Return Value

YES if the device was unmounted; otherwise, NO.

Discussion

When this method begins, it posts an NSWorkspaceWillUnmountNotification to the NSWorkspace object’s notification center. When it is finished, it posts an NSWorkspaceDidUnmountNotification.

The unmountAndEjectDeviceAtURL:error: is preferable because it provides more detailed error information.

It is safe to call this method from any thread of your app.

See Also

Unmounting a Device

- unmountAndEjectDeviceAtURL:error:

Attempts to eject the volume mounted at the given path.