Re: NSWorkspace and unmounting USB drives
Re: NSWorkspace and unmounting USB drives
- Subject: Re: NSWorkspace and unmounting USB drives
- From: Buddy Kurz <email@hidden>
- Date: Fri, 11 May 2007 11:55:01 -0700
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.
Thanks for the suggestion.
On May 11, 2007, at 11:07 AM, Shawn Erickson wrote:
On 5/11/07, Buddy Kurz <email@hidden> wrote:
I would like to be able to unmount a USB drive after copying data
to it.
When the drive is plugged in, NSWorkspace notifies my app. The device
path is "/Volumes/LaCie-Disk"
When I use [ws getFileSystemInfoForPath:devicePath ...] ,the volume
is writable but not unmountable.
[ws unmountAndEjectDeviceAtPath:devicePath] fails - not surprisingly
since the device appears to not be unmountable.
...maybe use diskutil?
[0:509] > diskutil unmountDisk
Disk Utility Tool
Usage: diskutil [mount(Disk)|unmount(Disk)|eject] <force>
[Mount Point|Disk Identifier|Device Node]
Mount, unmount or eject local disks or volumes.
force is only valid on unmount or unmountDisk.
Example: diskutil unmount /Volumes/SomeDisk
_______________________________________________
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