Ed Wynne wrote:
you want DA for DiskArbitration.

DiskArbitration is unfortunately rather poorly documented. It will take some trial and error to figure out how to make it work for you. But there are some developer blogs that yield some insight...

... unfortunately the bookmarks I had for them are on my other Mac, some sixty miles from where I am now...

... but Google could be your friend.

I'm afraid I can't just post my source. But what I suggest you do is create a very simple application that has an NSTextView in it, and when you get any kind of notifications from DiskArbitration, append a message to the text view.

Then put some buttons in your window, such that pressing the buttons result in commands being sent to DiskArbitration to mount, dismount and eject a volume, whose BSD name you can either enter manually in an NSTextField, or you could capture the BSD names that DiskArbitration tells you about and populate a menu with them.

Note that you can dismount a volume without ejecting it. If you do that then launch Disk Utility, you'll see the volume's BSD name in Disk Utility's list, but greyed out. The volume is still "known" to the system, but just doesn't have a mounted filesystem.

If you make such a testbed application as I describe, eventually DiskArbitration's operation will become quite clear and even appear sensibly designed. It's not that it's so difficult, it's that it's just undocumented.

Ever Faithful,

Rippit the Ogg Frog
rip...@oggfrog.com
http://www.oggfrog.com/


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to