Instance Method

unmountAndEjectDeviceAtURL:error:

Attempts to eject the volume mounted at the given path.

Declaration

- (BOOL)unmountAndEjectDeviceAtURL:(NSURL *)url error:(NSError * _Nullable *)error;

Parameters

url

The URL of the volume to eject.

error

If the operation fails, this error contains more information about the failure.

Return Value

YES if the volume was unmounted and ejected successfully, otherwise NO, for example, if the volume is not ejectable.

Discussion

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

See Also

Unmounting a Device

- unmountAndEjectDeviceAtPath:

Unmounts and ejects the device at the specified path.