0

有没有办法知道卸载请求是否失败?当驱动器不使用时,我称unmountAndEjectDeviceAtPath它运行良好。

但是当它在使用时,什么都不会发生。我首先认为 NSWorkspaceWillUnmountNotification 会被解雇,但没有。

任何想法 ?

谢谢

4

1 回答 1

3

你是在检查返回值-unmountAndEjectDeviceAtPath:吗?

无论如何,该文档指出“[t]he unmountAndEjectDeviceAtURL:error:[method] 更可取,因为它将提供更详细的错误信息。” 所以,我建议你使用它。

于 2012-05-21T00:34:48.320 回答