Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Like in the Disk Utility, how can I get the list of connected drives who are not mounted. And then, how can I mount them ?
Thx
磁盘仲裁框架可以处理各种任务,例如挂载磁盘:
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/DiscArbitrationFramework/DiskArbitration_h/
我不太确定磁盘实用程序如何知道可用驱动器,但一种可能性是它监视挂载/卸载活动(使用上面的框架)并简单地记住过去使用过的磁盘。例如,它可能会自动将磁盘的路径名保存在某个设置文件中,并在每次启动时恢复该列表。