Question

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).

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top