Ejecting disks
Ejecting disks
- Subject: Ejecting disks
- From: Steve Gehrman <email@hidden>
- Date: Fri, 1 Mar 2002 16:38:27 -0800
I'm trying to eject any ejectable volume. The code I'm using doesn't
seem to work with firewire disks or pci cards. Unfortunately I don't
have either of these to test myself, but I've gotten reports from users.
I've tried 2 methods of ejecting. Neither work for all types if volumes:
Method - 1:
[[NSWorkspace sharedWorkspace] unmountAndEjectDeviceAtPath:[desc path]];
Method - 2:
[[NSTask launchedTaskWithLaunchPath:@"/usr/bin/hdiutil"
arguments:[NSArray
arrayWithObjects:@"eject",[desc mountDevice],nil]] waitUntilExit];
Is there some something I need to do to make this work on all ejectable
volumes?
Thanks,
-steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.