I'm very new when it comes to Mac OS development and have some experience with Objective C for iOS and need some help getting started on a new project. I need to create something that listens for a drive mount and then lists the files from the drive in a list on the app. Unfortunately, there seems to be very limited tutorials on the subject and I just need help getting this off the line.

I've heard limited things about NSWorkspace but haven't found any tutorials on how to use that.

Also, If it helps, I'm looking for a DICOM-specific filetype (.dcm).

有帮助吗?

解决方案

You'll want to listen for the NSWorkspaceDidMountNotification notification, which is issued by the shared NSWorkspace's NSNotificationCenter.

This is pretty straightforward Cocoa stuff. These references may help:

Receiving Workspace Notifications

Notification Programming Topics

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top