gpt4 book ai didi

cocoa : Notification if unmount request fails?

转载 作者:行者123 更新时间:2023-12-03 17:35:32 25 4
gpt4 key购买 nike

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

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

有什么想法吗?

谢谢

最佳答案

您是否检查了 -unmountAndEjectDeviceAtPath: 的返回值?

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

关于 cocoa : Notification if unmount request fails?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10677530/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com