开发者

Cocoa equivalent of diskEvt/kEventClassVolume?

开发者 https://www.devze.com 2022-12-26 04:45 出处:网络
We have a drop-down menu of volumes in our UI, and I\'d like to update it when a new disk is mounted. In the 开发者_StackOverflow社区Classic days, this would involve watching for a diskEvt event. In C

We have a drop-down menu of volumes in our UI, and I'd like to update it when a new disk is mounted. In the 开发者_StackOverflow社区Classic days, this would involve watching for a diskEvt event. In Carbon, I think this was kEventClassVolume. What's the Cocoa equivalent?

(A pointer into Apple's documentation on this would satisfy the question. I've been unable to find anything!)


NSWorkspace posts NSWorkspaceDidMountNotification and friends on its notification center.


Disk Arbitration is responsible for those notifications. It's not written in Cocoa.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号