Re: NSWorkspace and unmounting USB drives
Re: NSWorkspace and unmounting USB drives
- Subject: Re: NSWorkspace and unmounting USB drives
- From: email@hidden
- Date: Mon, 14 May 2007 08:02:00 -0400
Check out the DiskArbitration framework. It allows you to monitor
devices as they are attached and removed, and you can initiate an
unmounts and ejects. It's Core Foundation-based, so, while not Cocoa,
it is object-based and conceptually similar, plus the headers are
documented with Header Doc. It was a private framework on Panther,
but became public with Tiger.
I wrote a Cocoa wrapper framework where I created an Obj-C class for
each DA object, but I'm not sure I would do it that way again.
Instead, I would just create a class within my application to interact
with DA to hide the details. I've played with it quite a bit, so if
you have specific questions, let me know.
Aaron
On May 11, 2007, at 2:55 PM, Buddy Kurz wrote:
That works from the command line - I guess I could run diskutil in
an NSTask as a last resort but I was hoping for something that felt
a little less funky.
Too bad there isn't an NSDiskutil class...
I can't imagine that the Finder runs diskutil - Carbon unmount
functions are deprecated - I'm not sure where else to look.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden